I alter some data in a table
Then I print a report from a record of that table
And then when I want to alter some data of an other record of that table I get the message: table in use.
Some where you are opening the table in a wrong way. You may not be opening the table only in Data environment. Probably, you are opening the table just before you do the report again.. SO I assume you must be opeing the table as given below..
SELECT 0
USE myTable ALIAS myTable .... with some order
Instead change those lines to..
IF USED("myTable"
SELECT 0
USE myTable ALIAS myTable
ELSE
SELECT myTable
ENDIF
This will avoid the duplicate opening attempt and solve your problem.
I use the following code all the time. I think RAMANI may have meant to open the table if it is not used or !USED()
IF !USED("myTable"
SELECT 0
USE myTable ALIAS myTable
ELSE
SELECT myTable
ENDIF
If you're using a form, not the BROWSE command, check the form's .BufferMode property or the DataEnvironment.Cursor1.BufferModeOverride property. If there is buffering set, then you may have to call the "TableUpdate(.T., .T.)" function to commit changes before moving to the next record.
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.