Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append blank does not increment key field
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00723872
Message ID:
00723990
Vues:
18
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform