An alternative to Spencer's suggestion could be to use a hierarchy of
locations if these are reasonably static eg

        if the file exists on X drive then
                open it
        else
                if the file exists on Y drive then
                        open it
                else
                        if the file exists on C drive then
                                open it
                        end if
                end if
        end if          

using the FileExists(Path+tablename) function in mapbasic.  The data on a
server can be accessed irrespective of the mapped drive using a path of
"\\server\path1\path2"

For this to work successfully the location of the data would need to be
controlled particularly when the data is stored locally.

Martin
==================================
Martin Roundill
GIS Manager
Waitakere City Council
Private Bag 93109
Henderson
Waitakere City
New Zealand

-----Original Message-----
From: Spencer Simpson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 5 December 2001 06:02
To: Driver, Greg 9434; Mapinfo Mailing List
Subject: Re: MI-L File open in MapBasic


"Driver, Greg 9434" <[EMAIL PROTECTED]> wrote:

> Is there a way to identify the location of a file in MapBasic without
having
> some sort of user inter-action (say using FileOpenDlg)?  The problem I
have
> is that we have some users (at remote locations) who access files on their
> C: drive, whilst others who access the same files via a server (though
even
> then the mapped drive pointing to the same server may well be different on
> different PC's).  So if I want to open a table in MapBasic that's held in
> different places what's the best way to go about it without getting the
user
> to locate it through a dialog?

The short answer is: Use an INI file to specify where the file goes.

The INI file can be created manually with a text
editor, or by a program you use to install your software,
an appropriate time for user interaction.

HTH
Spencer Simpson
GIS Developer
Baltimore Metropolitan Council
http://www.baltometro.org/metromapping.html




_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to