Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
View updates
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00169084
Message ID:
00169551
Vues:
20
>I changed my commands in the command window to ...
>
>lcStatus = "Customer"
>SELECT vTest
>INSERT INTO vTest (firstname,lastname,status) ;
>VALUES ("Joe","Smith","Customer")
>llUpdate = TABLEUPDATE()
>? llUpdate
>lnRequery = REQUERY('vTest')
>? lnRequery
>BROWSE
>
>... and it displays .T. for llUpdate and 1 for lnRequery, which indicate everything worked correctly. Again the data DOES make it into the base table, but the view does not display the new record in the view. If I close everything and reopen the view, set the parameter (lcStatus) and do requery, then the new record does appear in the view. But I shouldn't have to close the view to get the update righ?

Mark,

The only thing I can see is related to how you handle your parameters. The proper use is:
SELECT * FROM myTable WHERE myTable.cStatus = ?vp_cStatus
You have to declare vp_cStatus as a character parameter in the view definition.

So your code would be:
vp_cStatus = "customer"
Insert a new record
Notice that it is in the view
Then requery.
If the inserted record has the "customer" status it should be in the view, otherwise not.

José
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform