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.comICQ #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.