Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ID from MSDE
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
MS SQL Server
Divers
Thread ID:
01056080
Message ID:
01057719
Vues:
21
>Hi
>
>I'm using cursoradapter to access MSDE databases.
>I have a field type int with identity true and need to retrieve the value from that field when insert a new record, for use in a related table.
>I don't wanna use stored procedures or ODBC.
>
>TIA

Rodrigo,
use @@IDENTITY

try this
INSERT INTO CA_your_file (field2, field3) VALUES;
                         (value2,value3)

TABLEUPDATE(0,.f.)

SQLEXEC( sqlHandler,"select @@IDENTITY AS Id","cur_identity")
insert_identity = cur_identity.Id
In addition
take a look at Message #1029049
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform