your question is not clear, but i think this may help you
declare
SqlConnection
con with desired connection string,
SqlCommand
cmd,
SqlDataReader
reader,
string
selectSQL and 2
ComboBox
combobox1&combobox2
selectSQL = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES";
cmd = new SqlCommand(selectSQL, con);
con.Open();
reader = cmd.ExecuteReader();
while (reader.Read())
{
comboBox1.Items.Add(reader.GetString(0).ToString());
}
reader.Close();
use below code in SelectedIndexChanged event of combobox
selectSQL = "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = "+"'"+comboBox1.Text+"'";
cmd = new SqlCommand(selectSQL, con);
reader = cmd.ExecuteReader();
while (reader.Read())
{
comboBox2.Items.Add(reader.GetString(0).ToString());
}
reader.Close();
--theanil