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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL 6.5 w/Access 97 Front End - delete row problems

Status
Not open for further replies.

Scott2S

Technical User
Oct 27, 2000
48
US
I have a SQL 6.5 database on NT4.0. All referential integrity rules and "constraints" are coded in at the trigger level.

If an user using Access 95 links to a table of this database and attempts to delete a record that has related records, the delete fails with an error #3197 "Data has changed; operation stopped". I am not thrilled with this error because it doesn't reflect the true cause of the delete fail - the trigger rolling back the transaction.

If an user using Access 97 attempts this exact same process, Access 97 asks if he is sure that he wants to delete the data and then deletes it. At first the really freaked me out, but when I refreshed the table view the supposed deleted record reappeared.

I have a few questions about this. First of all why do I get different results with the version of Access? Second, do I have to use SQL’s referential integrity rules by setting up relations in the database or can I continue to use triggers with some added code in the trigger to give an error condition back to ODBC?
 
As long as the trigger performs a raiserror, you should be able to communicate the error to the client, provided the client is coded to respond to errors.

As for the Access version question, that is out of the scope of this forum..

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top