There could be various reasons why you are getting ths error.
Best practice is to open ALL tables in project at start, using IN 0 argument. This code follows your USE ... IN 0 statements.
The following code is for a single user machine
SET MULTILOCKS ON
FOR lnTableNo = 1 TO 32767
[tab]IF !EMPTY(SELECT(lnTableNo)) && Checks for open tables
[tab][tab]SELE (lnTableNo)
[tab][tab]REIN && Optional
[tab][tab]lcCurrentAlias = ALIAS()
[tab][tab]CURSORSETPROP([Buffering],5,(lcCurrentAlias))
[tab]ELSE
[tab][tab]EXIT
[tab]ENDIF
ENDFOR
* Application runs
*
*
TABLEUPDATE(.T.,.T.,[FILENAME]) && Update as required
*
*
* This code needs to be at end of MAIN in CLEANUP prcedure
FOR lnTableNo = 1 TO 32767
[tab]IF !EMPTY(SELECT(lnTableNo)) && Checks for open tables
[tab][tab]SELE (lnTableNo)
[tab][tab]lcCurrentAlias = ALIAS()
[tab][tab]TABLEUPDATE(.T.,.T.) && Updates all tables
[tab][tab]CURSORSETPROP([Buffering],1,(lcCurrentAlias)) && Remove buffering
[tab]ELSE
[tab][tab]EXIT
[tab]ENDIF
ENDFOR
SET MULTILOCKS OFF
* Other cleanup code
QUIT
If this code does not resolve the problem, please advise
Do you have the VFP Programmers Guide or help file? It gives a very good example of using TableUpdate. I'm assuming you attempted a TableUpdate on a nonbuffered table(s) [sig]<p>John Durbin<br><a href=mailto: john@johndurbin.com> john@johndurbin.com</a><br><a href=
If the table was opened by a form, you can set this property on the form-level and it will apply to all forms opened by it.
I wouldn't venture any further until you read up on buffering and gain an understanding of why you'd want it. Otherwise, you'll be frustrated when data doesn't save when you want it to, or does save when you don't.
Chris, I don't know about opening all tables at program start. This opens them up to corruption, and uses system resources that may never be called upon. For a small system, I agree; but with a system of 30+ tables, some which may never be used within a session, it would seemingly harm performance. [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href=
That is true, and I reiterate that, for a system of a practical size, opening them all at the start is the easiest way to go.
I'm probably a bit myopic now; every system I've worked on lately uses private data sessions, or has 100+ tables, or is client-server.... [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href=
Unable to answer your query, but the massed intellect and experience gathered here at this particular watering hole could probably produce the definitive guide to Visual FoxPro.
Save your money and keep asking the questions, no matter how simple.
We were all beginners once and we can all learn from the discussions.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.