Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remedial Transaction/Buffering/View Question
Message
 
À
18/03/1998 18:52:53
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00085516
Message ID:
00085555
Vues:
30
>I have an updateable, parameterized view that I insert a record into:
>
>INSERT INTO cuecards!cueCards (cue, phrase ) ;
> VALUES ( this.parent.card.Value, oKey.Value )
>BEGIN TRANSACTION
> IF TableUpdate(.T., .T., 'cuecards' )
>
>The table's ID field has a default value of GetID(). The function executes at that TableUpdate (not surprising), but when I look at the view's ID field (this is the primary key field), there's no value assigned. However, by the time I close the form, the field does have the value, okay.
>
>So, obviously, the view doesn't get refreshed with the table values. Obvious now, anyway. (Hey, I'm a beginner with views :-). How
>can I requery the view? Or is this just basically the wrong way to go about using views?
>
>TIA
Nancy,

You have to look at this as two separate data stores that are only linked during teh update and/or the requery.

You put a new record in the view without an ID
You tableupdate the view
this writes the data to the table and because the ID is blank the table
fire its default for that field

Now if you look in the view you have the record without an id, and if you look in the table you have the record with the id. How to fix this;

Requery("TheView")

to get the data from the table.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform