The One Who Was
Well-known member
Greetings:
Im looking for a way to fix some concurrency issues with my VB project. Id like for a user to be prompted with an error for each row that has already be modified by another user...
my issue is, I do no know now to compare each row in the dataset to its old value. My guess would be to create a new dataset, fill it, then compare the changes from the old dataset with the new one. Lets say my user has just made a bunch of changes to the current dataset named DatasetOld
Sub UpdateRows()
Dim dsNewTemp as New Dataset
Dim dsChanges as New Dataset
SqlDataAdatper1.Fill(dsNewTemp)
dsChanges = DatasetOld.GetChanges
.....
.....
.....
End Sub
Now that dsChanges has the changed values and dsNewTemp has the old data, how would I go about writing code that would loop line for line examining the time stamp and primary key and posting errors for the lines that were changes by someone else??
I apologize for my inexperience. With all the advantages Ive found with ado.net this has been so far the biggest disadvantage for me.
Thank you in advance to anyone who has taken the time to read this. You help is most appreciated.
~~The One Who Was~~
Im looking for a way to fix some concurrency issues with my VB project. Id like for a user to be prompted with an error for each row that has already be modified by another user...
my issue is, I do no know now to compare each row in the dataset to its old value. My guess would be to create a new dataset, fill it, then compare the changes from the old dataset with the new one. Lets say my user has just made a bunch of changes to the current dataset named DatasetOld
Sub UpdateRows()
Dim dsNewTemp as New Dataset
Dim dsChanges as New Dataset
SqlDataAdatper1.Fill(dsNewTemp)
dsChanges = DatasetOld.GetChanges
.....
.....
.....
End Sub
Now that dsChanges has the changed values and dsNewTemp has the old data, how would I go about writing code that would loop line for line examining the time stamp and primary key and posting errors for the lines that were changes by someone else??
I apologize for my inexperience. With all the advantages Ive found with ado.net this has been so far the biggest disadvantage for me.
Thank you in advance to anyone who has taken the time to read this. You help is most appreciated.
~~The One Who Was~~