Skip to content

How to display a table in a grid when its name is selectd from another grid

mathu mathi

Asked Feb 23, 2009, 7:25 PM EST4 answers
Share
LinkedInX
hai,
 i am working on an application where i connect to a database and list the tables available in it in a datagridview. now, from these listed tables when a user selects a table i want the description and content of the table to be displayed in seperate gridviews.... please help me i am new to vb.net

4 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    What all description of table (like coloumns,its data type,length, identity etc) do u needed..?
    0
  • 0
    i have the list of tables in one datagrid when a table is selected i need the description that is field name and its data type displayed in other datagrid
    0
  • 0

    sorry for being late...but its late than never right...? okay anyways when u select a table name from first grid, use this query

    SELECT COLUMN_NAME,DATA_TYPE
    FROM INFORMATION_SCHEMA.COLUMNS WHERE
    TABLE_NAME='<TABLE_NAME>'

    Replace <TABLE_NAME> with the table name from selected row in first grid

    hope this will help

    let me know if it didnt,

    0
  • 0
    hai  Santosh
    thank u  very much  it  works .. thanks  a lot
     
    0