Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto-Increment Dilemma
Message
From
28/02/2006 11:23:09
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01099725
Message ID:
01099932
Views:
14
>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
g_EMPTYDATA=CREATEOBJECT("EMPTY")
INSERT INTO MyTable FROM NAME m.g_EMPTYDATA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform