Now, when the previous issue got resolved, there is a new issue that has risen. When I run my code, it gives me the column name as(which is obviously not my column name):
System.Data.DataRowView
The code that I am using is:
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (textBox1.Text == "select" || textBox1.Text == "SELECT" || textBox1.Text == "SELECT")
{
string cmdstr = @"select * from information_schema.columns where table_name = '" +comboBox1.SelectedItem+ "'";
string conStr = @"Data Source=INPDDBA027\NGEP;Initial Catalog=Dev_Server;Integrated Security=True";
DataTable dt = new DataTable();
SqlDataAdapter sda = new SqlDataAdapter(cmdstr, conStr);
sda.Fill(dt);
listBox2.DataSource = dt;
}
}
Please Help.