"Workarea not in use" Error
Moderator: Rathinagiri
"Workarea not in use" Error
I have these 2 lines of code:
USE Library NEW
dbGoBottom()
which compiles fine but gives me this runtime error:
"Workarea not in use: DBGOBOTTOM".
I've looked at samples and right through the documentation but can't see why I'm gettiong this error. I would have thought opening the database and then navigating it should work.
Regards,
Alan
USE Library NEW
dbGoBottom()
which compiles fine but gives me this runtime error:
"Workarea not in use: DBGOBOTTOM".
I've looked at samples and right through the documentation but can't see why I'm gettiong this error. I would have thought opening the database and then navigating it should work.
Regards,
Alan
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: "Workarea not in use" Error
Hi Alanasharpham wrote: ↑Thu Mar 29, 2018 8:01 am I have these 2 lines of code:
USE Library NEW
dbGoBottom()
which compiles fine but gives me this runtime error:
"Workarea not in use: DBGOBOTTOM".
I've looked at samples and right through the documentation but can't see why I'm gettiong this error. I would have thought opening the database and then navigating it should work.
Regards,
Alan
Probably your file "Library" didn't open.
You can use USED() function just after USE command and before any database command / function to test database file is successfully open; and / or FILE() function before USE command to check existence of yor file.
Happy HMG'ing
Viva INTERNATIONAL HMG
- dragancesu
- Posts: 921
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Re: "Workarea not in use" Error
Command USE TABLE NEW
should only appear once in the program
If it's already open it can not again (maybe it can clipper, it can not hmg)
If is possible save problematic program in the zip and add it to the attachment,
it will be easier for everyone who wants to help
should only appear once in the program
If it's already open it can not again (maybe it can clipper, it can not hmg)
If is possible save problematic program in the zip and add it to the attachment,
it will be easier for everyone who wants to help
Re: "Workarea not in use" Error
I did this:
IF USED()
dbGoBottom()
ELSE
USE Library NEW
dbGoBottom()
ENDIF
but got the same result.
IF USED()
dbGoBottom()
ELSE
USE Library NEW
dbGoBottom()
ENDIF
but got the same result.
Re: "Workarea not in use" Error
Try to ask for an open alias before dbGoBottom ().
What is the active alias?
Code: Select all
USE Library NEW
MsgBox( Alias(), 'Active Alias' )
dbGoBottom()
Re: "Workarea not in use" Error
Hi asharpham
The correct code is
Code: Select all
USE Library NEW
IF USED()
dbGoBottom()
ENDIF
Anand
- serge_girard
- Posts: 3168
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: "Workarea not in use" Error
Hi Alan,
I have no problems with this:
If this gives error with your file, I think your file is corrupted (long filed name?)
Try to dbcreate it again with :
Serge
I have no problems with this:
Code: Select all
USE Library NEW
dbGoBottom()
Try to dbcreate it again with :
Code: Select all
// ferase('library.dbf')
aSTRUCT := { {"TRACKNUM","N",4,0 }, ;
{"ALBUM_NO","C",6,0}, ;
{"ALBUM_TITL","C",40,0}, ;
{"TITLE","C",33,0}, ;
{"ARTIST","C",40,0}, ;
{"ART_NO","N",4,0}, ;
{"TRACK","N",2,0}, ;
{"DUR","C",5,0}, ;
{"YR","C",2,0}, ;
{"FILENAME","C",8,0} }
dbCreate("LIBRARY",aSTRUCT)
USE Library NEW
msginfo(alias())
dbGoBottom()
There's nothing you can do that can't be done...
Re: "Workarea not in use" Error
Dbf file names are not delimited to 8 characters now
- serge_girard
- Posts: 3168
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: "Workarea not in use" Error
No, but fieldnames? I think:problem when reading...
Serge
Serge
There's nothing you can do that can't be done...