I just want user to select something from combobox and then whole row corresponding to that value should get displayed in datagrid. I am getting table but not getting any data in it.
Code:
cmd = New OleDbCommand("select * from titles where title_id=('@a') ", con);
cmd.Parameters.Add("@a", OleDbType.VarChar);
cmd.Parameters("@a").Value=ComboBox1.SelectedItem();
da.SelectCommand = cmd;
da.Fill(ds);
DataGrid1.DataSource = ds;
Probably error is in first line.Because if I change command to select * from titles and comment out second and third line,it shows whole table.
Please help