Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access - Referencial Integrity

Status
Not open for further replies.

beltijs

Programmer
Sep 11, 2003
25
AR
May i enable or disable de referencial integrity from Delphi?

I have Delphi 6 with ADO components (ADOConnections, ADOTables, ADOquery) and a .mdb file where the connection points to.

Paula
 
Why do you think you need to remove the referential integrity of the database? That's not really a good thing to do.

What are you trying to accomplish? Perhaps there's a different way?

Leslie
 
hi

Has Leslie says, you don't want to be disabling constraints on your database.

If this problem is arising when you're inserting/updating records, you're probably doing them in the wrong order for the db constraint. Update the table which doesn't have a constraint on it and then work 'upwards' or 'backwards' so the last table to be updated is the one with the constraint.

Hope that makes sense.

lou

 

Well, my application has two 'ways' of working, so it has 1 parameter that establish the way it may work, If that parameter has same value, i'will like to enable same aditional constraints.
i'm trying to handle this aditional controls from Delphi considering that i agree with you that is not the right thing to change de database definitions, but it will be much easer for ME to add the constraints so this is handle by de database.

Paula
 
hi Paula

Imho, I think you should leave the database structure alone and rethink your update method/routines. If you're finding it impossible to work with the current db structure then the structure(and constraints) may be wrong and need tweaking - Is the DB quite new or has it been running for some time?

Do you want to give us a better description of your current situation/problem and what you want to achieve and maybe you can compromise?

lou


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top