Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have two table product stock and product group in product group table one column is productgroupname that is using in product stock i want if we want to delete product group from product group table we cant do, until we not deleted that group from product stock, please help me
how we can i am using ms access database and .net
Posted

try marking this column as primary key in one table and foreign key in another table.

kudos
 
Share this answer
 
You should create relationship, check the below kb.
How to define relationships between tables in an Access database[^]

Besdies, you should check the Child Table for matching records exist before deleting Parent Table. Check my recent answer on this topic.
Handle Delete from Grid view have 2 tables with relationships[^]
 
Share this answer
 
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900