Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quick ADO Question
Message
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00627839
Message ID:
00627996
Vues:
14
try this:
sql = "set nocount on insert into products (CustomerId) values ('" & iCustNo & "') select @@identity set nocount off"
rs.open sql
msgbox rs(0)
>I want to insert a record into an Access table using:
>
>
>"insert into products (CustomerId) values ('" & iCustNo & "')"
>

>
>Then I want to add order detail items. For this I need to new
>auto-generated Id from the Access table.
>
>After the insert above, there could be many records for the customer,
>so how do I know the Id of the new record?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform