D
Dominic Belley
Hi,
I use VB.NET 2003 & SQL Server 2005.
I will try to make it simple.
I have a winform which has a textbox "Member No".
When the user enters a value and clicks the Search button, I call a stored
proc (SELECT) and fill a dataset with a dataadapter.
Then about 20 to 25 other textboxes in that winform get populated because
they are bound to that dataset.
After that is done, the user takes the time to make changes on the screen
and clicks on the SAVE button to save.
That calls the updatecommand of the dataadapter which is another stored
proc. (UPDATE)
--
That all works fine.
BUT ..
I need to add locking features to that to avoid having 2 users modifying the
same "member data" at the same time.
--
I read stuff on many website, but its never very clear and I can't find a
good simple snippet of code.
--
Here is what I have to do ..
1- Make my SELECT with my stored proc
2- ... let the user do his changes while the row is locked to others ...
3- Make my UPDATE with my stored proc
4- Unlock the data to others
....
I tried many things .. it doesn't work.
Does anyone have a clear example of this ? Using VB.NET .. a dataadaptor
with a dataset ..
Or should I stop using a dataset to complete these operation? ..
I so need your help on this.
Thanks a lot !!
I use VB.NET 2003 & SQL Server 2005.
I will try to make it simple.
I have a winform which has a textbox "Member No".
When the user enters a value and clicks the Search button, I call a stored
proc (SELECT) and fill a dataset with a dataadapter.
Then about 20 to 25 other textboxes in that winform get populated because
they are bound to that dataset.
After that is done, the user takes the time to make changes on the screen
and clicks on the SAVE button to save.
That calls the updatecommand of the dataadapter which is another stored
proc. (UPDATE)
--
That all works fine.
BUT ..
I need to add locking features to that to avoid having 2 users modifying the
same "member data" at the same time.
--
I read stuff on many website, but its never very clear and I can't find a
good simple snippet of code.
--
Here is what I have to do ..
1- Make my SELECT with my stored proc
2- ... let the user do his changes while the row is locked to others ...
3- Make my UPDATE with my stored proc
4- Unlock the data to others
....
I tried many things .. it doesn't work.
Does anyone have a clear example of this ? Using VB.NET .. a dataadaptor
with a dataset ..
Or should I stop using a dataset to complete these operation? ..
I so need your help on this.
Thanks a lot !!