Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error on Pack command

Status
Not open for further replies.

KoenPiller

Programmer
Apr 4, 2001
270
NL
Hi,
Any smartFox around who could give me an advice on following?
I am building a oneTable/oneForm application. On this form various SQL Select commands are issued inclusive modifications additions and delete to the table. Sofar so good. Thought it would be good to make also a "Pack" command button. On activating this PackcommandButton the following error which I can't solve: "Command cannot be issued on a table with cursors in table buffering mode" . Checked helpfile however I am not running and not intending to run in multiple user Network situation. What should I do or shouldn't I do to pack my table?
Koen
 
It might be helpful if you post the code in your packcommand button.

Make sure the table is opened EXCLUSIVE.

STORE ALIAS() TO myTable && Save the name of your table
USE && CLOSE THE TABLE
USE (myTable) EXCLUSIVE && Reopen the table with exclusive access rights.
PACK
USE
USE (myTable) && Reopen the table with default access rights.


 
If you are working as single user mode ... then you can globaly set this with
GLOBAL cSingleUser
IF cSingleUser'
SET EXCLUSIVE ON
ENDIF
in the main.prg at the beginning. This will help in doing commands such as PACK, ZAP etc. If thinking of multi user at later level, you can wrap these PACK or ZAP codes with

IF cSingleUser
PACK
ELSE
WAIT 'Feature cannot be used'
ENDIF

Hope the idea is useful.
ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
 
Hi Koen,

Your mode of buffering is what's preventing you from packing the table. Turn the buffering off using CURSETPROP, pack the table, then reset the buffering.

Jim
 
Cdavis,Ramani,Jimstarr

Thanks everybody, it's working fine.

Koen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top