Dear Sir/Madam,
I am planning to use DbDataAdapter.Update method of dotConnect Universal Professional to post the changes of DataTable to Oracle Database. But I do not know how sophisticated/well the DbDataAdapter.Update to handle the batch updates of DataRow/DataTable back to the Oracle database.
For example, if I need to update 10 DataRows back to the Oracle table for which 2 records in the Oracle table are currently locked by other application. How DbDataAdapter.Update reacts these two locked records from the Database? Will 8 out of 10 DataRows be updated back to the Database and failed 2, without any notification?
Would you please give me some idea or advice.
Many thanks
Richard Ho
Usage of DbDataAdapter.Update Method
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Usage of DbDataAdapter.Update Method
The Update method of the UniDataAdapter class updates rows until it reaches the locked row. After this the method waits for this row to be unlocked. The previous rows are already updated and submitted to the database.richardho wrote:For example, if I need to update 10 DataRows back to the Oracle table for which 2 records in the Oracle table are currently locked by other application.
If UniCommand has CommandTimeout is not equal to zero, then, after reaching the specified limit while waiting for the locked row, an exception is raised. For more information, please refer to http://www.devart.com/dotconnect/univer ... meout.html
You can use UniTransaction and perform the Update method of the UniDataAdapter class within a transaction. In such case you will have either all rows updated or no rows updated.
Re: Usage of DbDataAdapter.Update Method
Thanks Pinturiccio,
This is a professsional feedback on my enquiry. Though it is a common scenario of locking machanism for muilti-user environment. But you gave me the full picture of how dotConnect Universal handles this case.
Best Regards
Richard Ho
This is a professsional feedback on my enquiry. Though it is a common scenario of locking machanism for muilti-user environment. But you gave me the full picture of how dotConnect Universal handles this case.
Best Regards
Richard Ho