Dear MI-L List
The following syntax will change the working directory in Visual Basic:-
ChDrive "C:\"
ChDir "C:\MapInfo\Property\Forms\"
I use the following to run an Oracle Form in an Int Map App. It works quite
well but it doesn't pick up the "context files" which enables the
relationships
If you use VB you can use the same syntax in VBA:-
On Error GoTo create_error
Set mapinfo = GetObject(, "mapinfo.application")
'create OLE app to communicate with
create_error:
' if you are here it means that the " GetObject call failed
' and so you will need to make a new instance
Sharon,
It is quite possible that ODBC support isn't installed. It is a real pain
when supporting MapInfo because the installation of ODBC support is separate
from the rest of the program.
On the CD (MI5) MI5 program files are installed from:-
...\Install\MI_Pro
ODBC support is installed from:-
By using the following, for example, instead of "Hard coding" file names
mapinfo.do "open table """ PREF1 """ interactive"
You may get around the problem. To set these variables I try one of two
things
1 - Set settings in registry
2 - Write to an INI file which you can store in the "system
I haven't tested it but the following MapBasic Code should have the desired
effect.
Include "mapbasic.def"
Include "icons.def"
Declare sub Main
Declare sub View_Selection
Sub Main
Create ButtonPad "View All" as
PushButton
HelpMsg "View Selection"
Calling View_Selection