Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get next number from SQL Server
Message
 
 
À
20/11/2006 10:03:02
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01171148
Message ID:
01171205
Vues:
7
Jerry,

I'd recommend that you use an identity column if at all possible. If you can't you can accomplish what you want in an update:
UPDATE KeyTable
   SET @ReturnKey = LastKey = LastKey + 1
   WHERE ...
select @ReturnKey -- return to caller
>Thanks, good point. Yes, I can make the order number field in the order header table an autoincrement. I was trying to duplicate what we currently do with VFP without an autoincrement, but you make a good point.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform