Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting next auto increment record number
Message
From
22/08/2005 08:26:25
 
 
To
22/08/2005 08:03:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01042633
Message ID:
01042638
Views:
18
This message has been marked as the solution to the initial question of the thread.
>I need to get the next available record number from my table. Ussing a 'BEGIN TRANSACTION' and only 'END TRANSACTION' at end. Multilple inserts will take place and for every insert I need to know the record number(auto increment column in my table) to add records to a detail table (link on the record number of the header table).
>
>Must perform the same function as the @@identity in a MS SQL server database.

Use the field value, after the insert command.
begin tran

INSERT ...MYTABLE...
INSERT INTO DETAIL (idTable...) value (MYTABLE.autoincfield,...)

end tran
Previous
Reply
Map
View

Click here to load this message in the networking platform