Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Next Number generator
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00533898
Message ID:
00534896
Vues:
35
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform