Friday, February 24, 2012

How to find database table and their field name run time.

I am using sql server as back end. Through connection stringI am getting database name. But in A dropdown I want to show list of table inthat database. And in another B drop down I want to show fields of tableselected in A dropdown. can any one help in getting the field .

The sp_Tables query will return the tables in a database andsp_Columns returns the column names

http://www.vb-tips.com/dbpages.aspx?ID=9e2d9af4-3909-421d-b422-87c1d376674d

|||

And if you want to dig deeper into the structure of the database or server, you can use SQL-DMO in SQL Server 2000 or SMO (SQL Management Objects) in SQL Server 2005.

Don

No comments:

Post a Comment