Concurrency Question

Phylum

Well-known member
Joined
Jun 20, 2003
Messages
105
Location
Canada
I am writing a concurrency handler for an UNTYPED dataset. I want to present the user with all 3 versions of the record: theirs, current, original . The DBConcurrencyException object makes it easy to retreive "Theirs" and "Original". Getting the current version however presents a problem. How would I re-read the database and get the current version?
 
Youll need to re-run the query. That means filling a new DataSet or merging the rows with your existing ones. Youd have to write special queries to get the data you first retrieved via each tables Primary Key (will definitely work), or re-run your original query if youre sure it will return the same rows.

Is this for presentation, as in "Youve made changes from blah to blah and someone else has updated it to blah behind the scenes"? Sounds robust, but might be tricky. Good luck :)

-nerseus
 
Re-running the query is simple. The problem is if it returns more then 1 row your out of luck. I did have a method of finding it, which is loop through all the returned rows until the primary keys are equal. I was hoping for soemthing faster though, cause I could be in trouble if 10,000 records or more are returned. I guess if there is no other way im out of luck :(
 
Back
Top