Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error message command cannot be issued on a table
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00649809
Message ID:
00650484
Views:
30
>>>>>I am trying to zap a table and keep getting error message saying:
>>>>>
>>>>Command Cannot be issued on a table with cursors in table buffering mode
>>>>>
>>>>>On the form I have a grid linked to view called lv_status_tbl. In the dataenvironment I have a table exclusive status_tbl and a view lv_status_tbl. I have set buffering mode to none, optimistic and pessimistic but not difference. I am issuing the following commands in my cmdzap button:
>>>>>
>>>>>
>>>> select status_tbl
>>>>>SET SAFETY OFF
>>>>>ZAP
>>>>>SET SAFETY ON
>>>>>REQUERY('lv_status_tbl')
>>>>>thisform.Refresh()
>>>>>
>>>>>
>>>>>Does anyone know what I am doing wrong?
>>>>>
>>>>>Thanks
>>>>>Nick Patel
>>>>
>>>>Put select your table before ZAP command
>>>Thanks for replying. Now I get the message that "file must be opened exclusively" and in my dataenvironment the status_tbl has exclusive=.t. If I do the following:
>>>
>>>
>>>Use status_tbl exclusive
>>>select status_tbl
>>>SET SAFETY OFF
>>>ZAP
>>>SET SAFETY ON
>>>REQUERY('lv_status_tbl')
>>>thisform.Refresh()
>>>
>>>
>>>I get message that "file is in use"
>>>
>>>Thanks
>>>Nick Patel
>>
>>I guess, somewhere in the code you open this file shared, or somebody else opened it.
>>
>>Anyway, try:
>>use in select('MyTable')
>>select myTable alias WorkTable again in 0 exclusive
>>zap
>>....
>I got a error message when I save my form saying:
>
>command contains unrecognized phrase/keyword
>
>for the line:
>
>
>SELECT status_tbl alias worktable again in 0 exclusive
>
>
>I wrote the following code:
>
>
>USE IN SELECT('status_tbl')
 select 0
>USE status_tbl alias worktable exclusive
>SET SAFETY OFF
>ZAP
>SET SAFETY ON
>REQUERY('lv_status_tbl')
>thisform.Refresh()
>
>
>Thanks
>Nick Patel

It should be USE instead of SELECT. Sorry, my typo in the original message.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform