Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get next number from SQL Server
Message
 
 
To
20/11/2006 10:03:02
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01171148
Message ID:
01171205
Views:
6
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform