Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLEDB: how to get last auto-increment value after INSERT
Message
De
01/10/2015 16:59:37
Joe Kaufman
Bell Laboratories Inc.
Wisconsin, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 7
Network:
Novell 6.x
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01625339
Message ID:
01625341
Vues:
42
Borislav,

You ROCK!

I have been back in VFP 8.0 for so long I forgot about GETAUTOINCVALUE().

I confirmed it works, and I even confirmed that just a straight call to the function without housing it in a SELECT statement works fine. I am going to set it up in an ExecuteScalar routine so that I can always get the last auto-inc field generated with one call. Will probably make that function return true if there is a number to be had, and false otherwise (because it could be NULL if no auto-inc was generated...)

You saved me on this one, I can't thank you enough!

Thanks,
JoeK
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform