VB.NET + Rowlocking in SQL Server 2005

dbelley_office

New member
Joined
Apr 27, 2006
Messages
3
Programming Experience
5-10
Hi,

I use VB.NET 2003 & SQL Server 2005.

I will make it simple.

I have a winform which has a textbox "Member No".
When the user enters a value and click the Search button.

I call a stored proc and fill a dataset with a dataadapter.

Than about 20 to 25 other textboxes in that winform are bound to that dataset.

The user makes changes on the screen and click on the SAVE button to save. That calls the updatecommand of the dataadapter which is another stored proc.

--

That all works fine.

I need to add the Locking features to that to avoid having 2 users modifying the same Member at the same time.

--

I read stuff, but I can't make it work.

--

Step by step FROM my VB.NET app ..

I have to BEGIN a transaction
Make my SELECT
... let the user do his changes while the row is locked to others ...
Make my UPDATE
COMMIT my transaction

...

I tried many things .. it doesn't work.

Does anyone have a clear example of this ? Using VB.NET .. a dataadaptor with a dataset ..

Thanks a lot !!
 
Back
Top