Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto-Increment Dilemma
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01099725
Message ID:
01099880
Views:
16
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform