Displaying SQL Database Column Names?

  • Thread starter Thread starter Harry Whitehouse
  • Start date Start date
H

Harry Whitehouse

How might one go about this. I know how to select data records, but suppose
I wanted to fill a datagrid with the column names in a specified table? How
would I start?

TIA

Harry
 
I'm sure there is some DataSet or DataTable object that will do this
for you. But since I haven't used any of those, here's a simple query
you can run to get the column info for a table.

select * from syscolumns
where id = object_id('SomeTable')

Jonathan Schafer
 
You can query a database about pretty much anythinhg, tables, datatypes,
etc. How do you thing Toad or Erwin work?
 
Back
Top