Thanks to all those who replied, problem has been solved. Cheers!
Mike

-----Original Message-----
From: Steve Kalmbach [mailto:[EMAIL PROTECTED]
Sent: Friday, April 29, 2005 6:49 AM
To: Mayer, Mike @ Vancouver; [email protected]
Subject: Re: MI-L Save File/Open File


To get sTableName, try using the PathToTableName$() function, like this:
 
  sTableName = PathToTableName$(sFileName)
 
 - Steve

>>> "Mayer, Mike @ Vancouver" <[EMAIL PROTECTED]> 04/28/2005 02:27:15
PM >>>
Hello Everyone,

I have a small problem and need a little input from any of you expert
programmers out there.  I have a table that is the result of a select
query.
I want to take this table, save it, open it as new layer to display in
the
map window and zoom to the layer.  When i run the program to do this,
MapInfo tells me that it cannot find the specified table G:\MAPINFO\Map
projects\test.tab.  I know that the table is there, it saves correctly
and I
checked.  Here is my code, it stops at the highlighted line, any
suggestions
would be greatly appreciated:
    
    Dim sFileName, sTableName as String
    Dim snNum_windows as Smallint
    Dim nWinID as Integer

    If SelectionInfo(SEL_INFO_NROWS)> 0 Then
        Browse * From Selection    
        
        sFileName = FileSaveAsDlg("G:\MAPINFO\Map Projects", "",
"TAB", "Save Selection")
        Commit Table Selection
            as sFileName
---    -->    sTableName = TableInfo(sFileName, TAB_INFO_NAME)
<----------
        Open Table sTableName Interactive
        Add Map Auto Layer sTableName
        snNum_windows = NumWindows()
        nWinID = WindowID(1)
        Set Map    
            Window nWinID
            Zoom Entire Layer sTableName

Thanks in advance

Mike Mayer
(GIS Practicum Student)


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 
Message number: 16298




---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 16312

Reply via email to