Order of Insert and Delete operations

Order of Insert and Delete operations

Postby sysment » Mon 17 Mar 2014 14:20

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
sysment
 
Posts: 3
Joined: Mon 17 Mar 2014 14:10

Re: Order of Insert and Delete operations

Postby MariiaI » Wed 19 Mar 2014 14:37

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.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Order of Insert and Delete operations

Postby sysment » Fri 21 Mar 2014 15:15

Hi,
I sent the sample project to support@devart.com.

Thanks for your help!
sysment
 
Posts: 3
Joined: Mon 17 Mar 2014 14:10

Re: Order of Insert and Delete operations

Postby MariiaI » Mon 24 Mar 2014 12:22

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.
MariiaI
Devart Team
 
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Order of Insert and Delete operations

Postby sysment » Wed 26 Mar 2014 10:07

Thanks for your help. Unfortunately I cannot use the latest version because of some dependencies, but I will upgrade as soon as possible.
sysment
 
Posts: 3
Joined: Mon 17 Mar 2014 14:10


Return to dotConnect for Oracle