Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append blank does not increment key field
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00723872
Message ID:
00723990
Views:
17
That would work but the value for the primary field is not known until the SP fires and gets the next avaulable id number. I get an error message (cannot insert an empty row from a view into its base table), when I do the Requery().

>I had some fun with this as well!
>
>The Stored Procedure does not get fired when using Append Blank.
>
>* ID, FNAME, LNAME, MNAME
>SELECT viewNames
>APPEND BLANK
>
>* viewNames.ID = 0
>REPLACE fname WITH 'John', lname WITH 'Jones', mname WITH 'Percy'
>
>* this will save the record to the actual table
>* This will also call the Stored Procedure
>GOTO RECNO() && or try TABLEUPDATE(.T., .T.)
>
>* viewNames.ID = 0
>* table Names.ID = 123
>
>= REQUERY()
>
>* viewNames.ID = 123
>? viewNames.ID
>
>
>Have fun!
Extreme Programming = Plan -> Design -> Code -> Test
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform