Hi,
[...this is probably off-topic as it's related to database applications, not Lazarus specifically...]
How do you guys handle such a case in database applications. Say you have an TAddressType object/record. Now you have a lot of Contacts with address information stored in a database (and address book type application)
Now I want to delete a specific AddressType, but that AddressType is being used by some Contacts in there address information.
What's my choices? How do you handle such a case?
* What happens if you simply try and delete the AddressType?
* DB referential integrity might stop the delete, but gives a lovely error. If I don't have referential integrity enabled, I have ghost address types lying around.
* Do I have to create some search query to run through all tables looking for that AddressType?
* Must I maybe extend my AddressType table to include some 'Active' boolean field. If set to False, it simply hides that record from the GUI, but still available in the database?
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
