Bill, You will need to select from the SYSOBJECTS table the names where the xtype is U, for user-defined. This avoids all the system tables that are present in each database too.
the general form of the query you need is simply :- Select cast(name as varchar(100)) From 'sysobjects' where xtype = 'U' you need to have the cast statement for the name field has the datatype 'sysname' within SQL which will not be recognised by MapInfo. Cant be too specific at the moment, but that should help you along the way. Regards Dave >>> Bill Thoen <[EMAIL PROTECTED]> 10/10 10:25 pm >>> I'm working on a MapBasic app where I need to query a SQL Server database to get a list of the tables it contains. I use Server_Connect() and can get a valid connection handle to a SQL Server database, and I assume I'll need to send some SQL string via Server_Execute() to get a list of the tables, but what string do I send? Or do I need to do something else? All I know for sure is that the technique is different for different database servers. Any experts in SQL Server out there? -- - Bill Thoen ------------------------------------------------------------ GISnet, 1401 Walnut St., Suite C, Boulder, CO 80302 tel: 303-786-9961, fax: 303-443-4856 mailto:[EMAIL PROTECTED], http://www.gisnet.com/ ------------------------------------------------------------ _______________________________________________________________________ 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. ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** _______________________________________________________________________ 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.
