Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Lock row
Message
 
 
À
20/03/2004 11:14:14
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Titre:
Divers
Thread ID:
00888209
Message ID:
00888225
Vues:
11
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform