Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto-Increment Dilemma
Message
De
27/02/2006 20:04:44
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01099725
Message ID:
01099726
Vues:
18
Perhaps you could use APPEND BLANK instead?

I don't know whether this can be done with INSERT INTO.

>My tables all have auto-increment turned on.
>
>When the user clicks the New Record button on the screen, normally I
>would do
>
>
>nNewId = GetNewPrimaryKey()
>INSERT INTO MyTable (Id) VALUES (nNewId)
>
>
>All other fields on the record are data entry fields and could be optional.
>
>So what do you insert to add a new record when using auto-increment?
>
>And, how do you know what the Id was that was auto-added?
>
>Thanks
>
>Kevin
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform