I'm stumped here. I hope somebody can see something I'm not...
I'm running a command to grab some metadata from a table - however, if that
table is not open, I use the onerror command to go open the missing table.
However, that table is never opened, and the error still comes through.
Here is the code...(I'm working with predefined table names - every table
used by this application was created by the application, so FDA_Boundary is
an actual table name...)
onerror goto missing_file
gg_workordernum = getmetadata$(fda_boundary, "\wo")
the error code is:
missing_file:
if ask ("The table ""FDA_Boundary"" is not open in MapInfo.
The table must be open to add a new FDA Boundary. Do you wish to open it?",
"Yes", "No") then
gg_curr_tab = fileopendlg(gg_file_dir,
"FDA_Boundary", "TAB", "Open FDA_Boundary File")
if gg_curr_tab = "" then
exit sub
else
open table gg_curr_tab
resume 0
end if
end if
If I click "no" from the ask dialog, everything resumes normally, and I
successfully recover from the error. The same if I click cancel from the
file open dialog. However, after selecting the correct file from the file
open dialog and clicking "OK", I still get the error that "Variable or field
FDA_Boundary not defined" because the table was not opened in MapInfo.
Can anybody see what I'm missing, or maybe a better way to do this? Maybe
I've just been working on this application for too long.
Paul Lukas
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 14192