Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting next auto increment record number
Message
De
22/08/2005 08:26:25
 
 
À
22/08/2005 08:03:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01042633
Message ID:
01042638
Vues:
17
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform