Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Execution of SQL Server Stored Procedure
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00867969
Message ID:
00867989
Vues:
24
Ok thanks!

>You don't need extra locks because everything is done in one UPDATE command.
>
>>Thanks Sergey!
>>
>>How about using RowLock? Do you think it will also help?
>>
>>>You've to modify it a little bit to avoid duplicates. It's also better to return value as an output parameter.
CREATE PROCEDURE GetSeriesNo
>>>	(@doccode varchar(10), @seriesno int OUTPUT)
>>>AS
>>>BEGIN
>>>--	DECLARE @seriesno int
>>>	Update ccdoc
>>>		Set seriesno = seriesno + 1, @seriesno = seriesno + 1
>>>		Where doccode = @doccode
>>>--	SELECT @seriesno
>>>END
>>>
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform