Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lock row
Message
 
 
To
20/03/2004 11:14:14
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Title:
Miscellaneous
Thread ID:
00888209
Message ID:
00888225
Views:
9
This message has been marked as the solution to the initial question of the thread.
It can be done w/o explicit row lock. See Re: Next Number generator Thread #533898 Message #534192. Using Identity column in your table maybe also an option you should consider.

>I want to lock a row in a table.
>
>I want to create an stored procedure for this task
>
>This table holds correlatives numbers and this what i want to do
>
>1.) Lock the row
>2.) Increment the correlative numer, Column1 = Column1 + 1
>3.) Assign the number to an output parameter.
>4.) Unlock the row
>
>This will prevent duplicating a correlative number.
>
>Can someone help me please.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform