Hi Greg,

MS/SQL is very much like Access, and MS/SQL keeps the tables list in a special system table called sysobjects. One can query this table as any other table.

I wondered whether Access didn't have a similar construct, and under that assumption, I google'd for it, and found this query :

    select name from MsysObjects WHERE type = 1

I haven't tested it, but I think it's worth a try.

This link explains more about the MsysObjects : http://www.accessdatabasetips.com/msysobjects.html

HTH

Best regards / Med venlig hilsen
Lars I. Nielsen
GisPro


Greg Goodall wrote:

I want to display to my users a MultiListBox containing the names of the tables contained in a Microsoft Access Database.  I plan on using the FileOpenDlg() function where the user will identify the name of the Access database as below.

 

Dim s_database_name As String

s_database_name = FileOpenDlg("","","MDB","Open Table")

 

When the database name is identified I will create a simple dialog (almost identical to the Open Access Table dialog in MapInfo [File/Open; set Files of type: to .mdb; user selects a .mdb file]) with the MultiListBox containing the table names.  I know MapInfo has this capability, thus it surely can also be done programmatically in MapBasic.

 

 

So, the question is, “How do I obtain the names of tables in a Microsoft Access database via MapBasic?

 

Thanks in advance for your assistance,

 

Greg Goodall

Senior Systems Analyst

 

 

 


_______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l


_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to