Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this possible?
Message
De
30/08/1999 15:35:54
 
 
À
30/08/1999 15:23:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00259224
Message ID:
00259346
Vues:
24
>>>>Given an optimistic table buffered cursor against an updateable view:
>>>>
>>>>Suppose the cursor has already been queried , and changes made by the user.
>>>>
>>>>There is an existing record in the base table, that was not included in the query and thus is not in the cursor against the view.
>>>>
>>>>Is there a way to add this existing record to the cursor without requerying the view?
>>>>
>>>>My guess is no -- but there are people on this thread who do amazing things.
>>>
>>>Not without doing it manually. You can always open the base table in another work area, and SCATTER, GATHER into the view.
>>
>>Thanks
>>
>>I presume you means scatter, gather from the view into the base table. If I scatter, gathered into the view when I issue a tableupdate it will simply try to add the record a second time,violating the unique key.
>
>No, I meant from the table to the view. I think you are right though, you will have problems unless you pull some funny stuff. You can use SETFLDSTATE to trick the view into thinking that the record is not new. VFP uses GETFLDSTATE to determine what records should be updates in an SQL INSERT and which should be updated in an SQL UPDATE. If you change the record's status, it will not try to insert the record, but try to update it, which should be fine.


That sounds perfect. I will try the setfieldstate right away.

Thanks
Thanks

Gar W. Lipow
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform