Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ID from MSDE
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
MS SQL Server
Miscellaneous
Thread ID:
01056080
Message ID:
01057719
Views:
20
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform