Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
From VFP auto incremental key to SQL Server
Message
De
16/10/2006 03:00:52
 
 
À
16/10/2006 02:58:12
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Import/Export
Divers
Thread ID:
01162137
Message ID:
01162171
Vues:
20
>While I haven't tried it, my guess is that if you executed the line of code as a pass-through command to your sql 2005 provider...
>
>
>string cMyCommand = "INSERT INTO Mytable OUTPUT Inserted.MyIdentityCol VALUES ('whatever')";
>
>
>I 'believe' it will give you back a one-row, one-column result set with the key value. If that does work, it's better than having to make another round trip back to the server to get the new ID value using scopeidentity.

I will keep you inform on this. I am having all kinds of problem with the packaging issues presently trying to upscale some data to SQL Server. Once I resolve all of that, I will be able to test this.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform