Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto-Increment Dilemma
Message
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:
01099880
Vues:
17
Do the optional fields support NULL values?

>No, no, you're missing missing my point.
>
>My question was; Assuming all fields on a record are optional, and the Id is auto-incremented,
>then what is left to INSERT in the SQL command?
>
>I'm trying to create a generic AddRecord method that gets called whenever the user clicks
>the Add Record button, but that adds another twist; in a generic method, you won't know what
>data to insert to create a new record.
>
>I used to use:
>
>nNewId = GetNewPrimaryKey()
>INSERT INTO MyTable (Id) VALUES (nNewId)
>
>
>
>But now since the Id is auto-incremented, there is really no way to use a SQL INSERT
>command.
>
>
>
>
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform