G
Guest
Hi ,
I would like to know when does DBConcurrencyException exactly occur. What i
want is to catch data concurrecy conflicts in a multi user environment.
I know how to do it in classic ADO by using UpdateBatch method which throws a
Hresult = DB_E_CONCURRENCYVIOLATION.After this you can set a filter on the
recordset and call ADO resync method.
How can the same be achieved in ADO.Net ??
Situation: User A reads in a table makes changes. User B read after that.
User B modifies data and writes it back to database. Now A had stale data
with him. When he go to update the database table will a DBConcurrency
exception get raised.
I have tried this with a sample where i have two independant
OleDBDataadapters and two datasets to simulate two users basically. Every
time i try to update a record
which has got changed in underlying db by some other user it suceeds , in
stead of failing as concurrency conflict has occured.
Is there any other way to simulated this kind of a situation.
Regards
Vikram Lagu
I would like to know when does DBConcurrencyException exactly occur. What i
want is to catch data concurrecy conflicts in a multi user environment.
I know how to do it in classic ADO by using UpdateBatch method which throws a
Hresult = DB_E_CONCURRENCYVIOLATION.After this you can set a filter on the
recordset and call ADO resync method.
How can the same be achieved in ADO.Net ??
Situation: User A reads in a table makes changes. User B read after that.
User B modifies data and writes it back to database. Now A had stale data
with him. When he go to update the database table will a DBConcurrency
exception get raised.
I have tried this with a sample where i have two independant
OleDBDataadapters and two datasets to simulate two users basically. Every
time i try to update a record
which has got changed in underlying db by some other user it suceeds , in
stead of failing as concurrency conflict has occured.
Is there any other way to simulated this kind of a situation.
Regards
Vikram Lagu