Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local view, delete and requery
Message
From
24/07/2003 19:06:07
 
 
To
24/07/2003 03:44:54
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00805198
Message ID:
00813335
Views:
11
>>
>>Could you provide complete repro code that demonstrates the problem?
>>
>>Thanks,
>>Aleksey.
>
>Well, this code is located at my base maintenance form class, at second page's Activate Method. I needed to requery the view, because I have a grid control on the second page which shows all the records. I wanted to this point to be where new records should be updated.
>
>Before, it was like this:
>
>lcAlias = ALIAS()
>IF CURSORGETPROP("SourceType",lcAlias) # 3
>
> REQUERY(lcAlias)
>
>ENDIF
>
>This resulted an empty view if a record was deleted before the requery.
>
>I changed it to:
>
>lcAlias = ALIAS()
>IF CURSORGETPROP("SourceType",lcAlias) # 3
> SELECT (lcAlias)
> REQUERY(lcAlias)
>
>ENDIF
>
>And no more empty view after record deletion... normal behaviour as it should be...
>
>I'm sure that the view was selected also in the first case, because the VFP statusbar indicated my view name after requery. Only that record number was none and in exclusive mode....
>
>If i recall right, you can also reproduce this behaviour opening a local view in command view, then deleting a record from it, then requerying the view = empty view. With my view and my VFP7 SP1, it was the case. After closing all the tables view based on , and re-opening the view, the result was correct. But adding this SELECT seems to help.

Hi Tapani,

Actually, I was asking for a COMPLETE repro code that I can run and see how it fails.

Thanks,
Aleksey.
Previous
Reply
Map
View

Click here to load this message in the networking platform