on 08-25-2015 8:36 PM
(This is a repost from the old forum. I didn't realize there was a new place to post questions. Feel free to delete from either place)
I have a problem related to transactions + RI rules.
I have a master/detail table set up. I have an RI rule set up on these tables to Update/Cascade and Delete/Set Null.
I begin a transaction.
I update a child detail record (to reset default values).
I delete the parent header record.
This causes the following error: QryTemp: Error 7200: AQE Error: State = HY000; NativeError = 5035; [iAnywhere Solutions][Advantage SQL][ASA] Error 5035: The requested lock could not be granted. The file or record may be locked by another user. This record lock was necessary because of a cascaded update or delete due to exising referential integrity rules. Table: \FS01\CON1\STOPS.ADT Record #: 46079
Why is the engine considering the child record locked when both operations happen under the same AdsConnection object, and within the same transaction. This code works fine outside of the transaction.
Thanks for your time, Dusten
I already answered this on the devzone forum:
How to update and then delete a record inside of a transaction - ADS Forum
Here is how I understand what's going on:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the ADS Version you are using exactly? If you are not on the latest Version of ADS, so I would recommend to make an update to the latest hotfix and try it again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.