Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Next Number generator
Message
From
25/07/2001 06:32:28
 
 
To
24/07/2001 10:58:31
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00533898
Message ID:
00534866
Views:
27
Hi!

With ORACLE this will not work. I would recommend you to make a SP in the database and call it from the code. When you move to another type of database server, you will just change that SP. Anyway, the best way to return new value in such case will be the OUTPUT parameter of the stored procedure, because different srver return results from SP by different way. In VFP help you can read samples how to get output parameter value at VFP side using SQLEXEC function.

>Hi micheal,
>
>Just wondering ; is this 'SQL server' code or still standard SQL code ? In other words, will this work on other databases ?
>
>>There's a cleaner way. You can use UPDATE to increment and fetch the value without have to explicitly manage the locks:
>>
>>UPDATE id
>>SET @nnid = idval, idval = idval + 1
>>WHERE keyname = @tcKeyWord
>>
>>-Mike
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform