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
How to display a table in a grid when its name is selectd from another grid
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Santhosh Rajan7 pointsPosted Mar 19, 2009, 11:16 PM EDT
mathu mathi15 pointsPosted Mar 20, 2009, 8:38 PM EDT
Santhosh Rajan7 pointsPosted Apr 17, 2009, 3:04 AM EDT
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,
mathu mathi15 pointsPosted Apr 21, 2009, 2:22 AM EDT
thank u very much it works .. thanks a lot