Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local View - Record Not Marked Deleted
Message
From
03/05/2006 16:55:35
 
 
To
03/05/2006 16:33:04
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Miscellaneous
Thread ID:
01118900
Message ID:
01118923
Views:
15
Cetin,

O.K., I've never noticed the FILTER/NOFILTER option in the SELECT statment. After trying it both ways, I can now see that the REQUERY() on the view works like SELECT * FROM table INTO CURSOR temp NOFILTER and using FILTER causes the DELETED marker to come into the temp cursor.

But, how do I control this when I've created a local view in the View Designer and just USE the view and issue REQUERY() against it to refresh the data. I tried adding the INTO CURSOR xxxx FILTER to the "View SQL" staement in the View Designer but got a syntax error. Is there a way to save this in a local view so I can just USE & REQUERY() the view?

Thanks,
Robert

>I didn't mean filter. Add a nofilter to your SQL.
>Cetin

>Cetin,
>
>I tried using SELECT into a temporary cursor (with SET DELETE OFF) and the record show up but with the DELETED marker, like I would expect. I though using REQUERY() was the same thing as re-runing the SELECT statement of the view. Why is the behavior different ?
>
>Thanks,
>Robert
>
>>Robert,
>>(set deleted off) Delete a record in a table then select * from that table.
>>Cetin
>
>
>
>>I've been using remote views with a MS SQL back-end for some time and have no problems adding, updating or deleting records.
>>
>>Also, I've often used local views when creating a view against a local DBF and a remote views. However, I've never built local views only against DBF tables, until now. Recently, I started creating local views against some DBF but am having trouble understand how it handles DELETED records.
>>
>>I just created a DBF and then created a local view against the table. If I delete a record in the view, the record gets marked for deletion in the DBF. However, if I REQUERY() the view the deleted record reappears but without the deleted marker. But, if I use the "Data Session" window to look at the DBF, the record is still marked as a deleted record. SET DELETED was OFF when I was running this test. When I changed it to SET DELETED ON, the REQUERY() no longer brings the deleted record from the DBF into the view which makes since but I'm surpised that when SET DELETED is OFF that the REQUERY() causes the record to reappear in the view without the deleted marker. Likewise, when I test for ? DELETED() against the record in the view it shows to be .F. but .T. in the DBF
>>
>>Can someone explain to me why the record would not show as a DELETED() record in the view, just like it does in the DBF?
>>
>>Thanks,
>>Robert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform