Page 1 of 1

Order of Insert and Delete operations

Posted: Mon 17 Mar 2014 14:20
by sysment
Hi,
there is a form where the user can manage records from a data table in a grid. When the user clicks on OK, I call DataContext.SubmitChanges.

The problem is that the user deletes a record, then adds another one with the same unique key (not the primary key). In this case we will have two operations: a delete and an insert.

When I call DataContext.SubmitChanges, the engine executes the insert operation first, and it causes a UK violation error. If it had executed the delete first, then everything would be fine.

Is there away to determine the order of the operations?

Thanks for your help,
Zoltan

Re: Order of Insert and Delete operations

Posted: Wed 19 Mar 2014 14:37
by MariiaI
Please send us a small test project with the corresponding DDL/DML scripts, so that we are able to reproduce this issue and investigate it in more details.

Looking forward to your reply.

Re: Order of Insert and Delete operations

Posted: Fri 21 Mar 2014 15:15
by sysment
Hi,
I sent the sample project to support@devart.com.

Thanks for your help!

Re: Order of Insert and Delete operations

Posted: Mon 24 Mar 2014 12:22
by MariiaI
Thank you for the sample project. We have reproduced this issue with LinqConnect 4.4.383. However, this issue is not reproducible with the latest build of LinqConnect 4.4.453 (dotConnect for Oracle 8.3.115).
Please try the latest build and tell us about the results.

Re: Order of Insert and Delete operations

Posted: Wed 26 Mar 2014 10:07
by sysment
Thanks for your help. Unfortunately I cannot use the latest version because of some dependencies, but I will upgrade as soon as possible.