Q
Problem solve Get help with specific problems with your technologies, process and projects.

Display all tables from SQL Server using Visual Basic 6.0

How do I display all of the tables from SQL Server using Visual Basic 6.0? For example, if I have three tables in a public database, how do I display only the table names that are in the public database?
I would recommend using the Information Schema Views in your database and specify the correct WHERE clause. Here is an example:
USE Pubs
SELECT Table_Name 
FROM INFORMATION_SCHEMA.Tables
WHERE Table_Name IN ('Authors', 'Titles', 'TitleAuthor')


Do you have comments on this Ask the Expert Q&A? Let us know.
This was last published in May 2005

Dig Deeper on Microsoft SQL Server Performance Monitoring and Tuning

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close