Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can i get autonumber id with access?
Message
Information générale
Forum:
Visual Basic
Catégorie:
Access
Divers
Thread ID:
00506327
Message ID:
00507885
Vues:
28
>from the ado2.6 reference book, it looks like i can get the generated id using odbc connection if i have cursorlocation = server, cursor type = keyset, lock type = pessimistic/optimistic (of course, i don't know what the last two attributes are). anyway, i thought i needed to have the cursorlocation = adUseServer but that didn't work and the datagrid wasn't working until i changed the cursorlocation = adUseClient (thanks again). so i can create different function for these two scenarios but i can't seem to get the generated id to work so at this point it doesn't make sense to write another function until i get it working.


Server Location doesn't make sens with Access because there is nothing that is running on the server side!

After you call the .Update method, try a .Move 0 and then query the AutoNumber field. I have seen it working with SQL Server and Oracle.

Also, have a look at: http://support.microsoft.com/support/kb/articles/Q190/3/70.ASP

If this still not working, I still recommend to use the Jet driver.

Again, see this article: http://support.microsoft.com/support/kb/articles/q244/1/36.asp
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform