dbmanalser84
Registered User.
- Local time
- Today, 13:47
- Joined
- Feb 26, 2008
- Messages
- 52
I have two tables which are connected with one to many relation, here are these tables:
tblCars
PK. intCarID
txtModelName
intManufacturerID
intModelPrice
tblManufacturer
PK. intManufacturerID
txtName
txtAdress
txtTelephone
Now, how do I achieve that when I delete a Car from the database, the Manufacturer is not deleted, because as you know one Manufacturer can create several model of cars, but when I delete Manufacturer all the cars from that Manufacturer are deleted? I know I need to enable cascade Delete but when I do that in each case when I delete a record from one database its relational record from the other table is deleted. How do I acomplish this?
tblCars
PK. intCarID
txtModelName
intManufacturerID
intModelPrice
tblManufacturer
PK. intManufacturerID
txtName
txtAdress
txtTelephone
Now, how do I achieve that when I delete a Car from the database, the Manufacturer is not deleted, because as you know one Manufacturer can create several model of cars, but when I delete Manufacturer all the cars from that Manufacturer are deleted? I know I need to enable cascade Delete but when I do that in each case when I delete a record from one database its relational record from the other table is deleted. How do I acomplish this?