Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is this possible?
Message
From
30/08/1999 15:23:21
 
 
To
30/08/1999 15:12:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00259224
Message ID:
00259342
Views:
19
>>>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.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform