Can some one give me some suggestions on how to create such table browser say i have the servername, how do i go about creating, say a treeview or something, that displays the available databases, tables and columns
There is no generic way to do this. You have to know the correct command to issue through your provider to your database (e.g. query system tables, etc).
Browse database objects
dougal83
You can browse all the objects you like using SMO, (SQL Management Objects).
You'll find it in namespace Microsoft.SqlServer.Management.Smo.
Start with the Server object, from there you can enumerate databases, then tables, users, roles, stored procs, and so on.
kenichi yamazaki
Can some one give me some suggestions on how to create such table browser say i have the servername, how do i go about creating, say a treeview or something, that displays the available databases, tables and columns
thanks
Nixies
ventura
If you're using Sql Server 2005, you can query the system catalog view:
Select
* from sys.tables;Charles