Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Next Number generator
Message
From
25/07/2001 08:40:53
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00533898
Message ID:
00534896
Views:
38
Hi!

That was exactly what I meant. Make it as a call of SP and forget about details. On SQL Server SP will use ID table. In Oracle sequences will be used in that SP. In any case VFP APP will require little of changes.

>You don't need it in Oracle because it has a built-in database object that generates a series of unique integers called sequence. Sequences are typically used to generate data values that are required to be unique, such as primary key values.
>
>>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
Reply
Map
View

Click here to load this message in the networking platform