Displaying a list of databases and tables
How do I do this?
i.e., suppose I have 2 databases called, "Houses", and "Food".
In "Food", I might have tables like "fruits", "vegetables", "meat", etc.
In "Residential", I might have tables like "Condos", "Apartments", "Houses", etc.
I want to be able to list the databases and tables in that database. I know I can do this with extra tables, but I don't want to do that.
Wait, how come you have separate tables for all of this stuff? You can simplify this a whole lot by just giving one table a category like zoneing and have residential commercial industrial then another like proptype and list house appt condo and then use a select statement to list it.
What is your database; Oracle, SQL Server, Access...?
If it is SQL Server, you can use the SQLDMO COM component to get all the databases and tables on your server. You can actually use this component to programmatically administer your SQL Server. You just have to reference this component in your application. (I believe you will have this component on your development machine if you have SQL Server installed.)
I don't know if there is a similar .net assembly, but you can do a little research.
There are also Access and Oracle COM components, but I don't know if they can do what you need. You have to try them.
Happy New Year!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)