Can nyone tell me how to relatr combo boxes????
i hv used this code bt this is throwing exception ......ny help would be appreciated .I hv jst started wworking on c#
i hv used the following code nd i hv populated the cmbschoolcode in loading of my form
private void cmbSchCode_SelectedIndexChanged(object sender, EventArgs e)
{
String connectionString = System.Configuration.ConfigurationSettings.AppSettings["dsn"];
DataTable dt = new DataTable();
string Query = String.Format(@"SELECT RegNo FROM Student WHERE SchoolCode ={0} ", cmbSchCode.Text);
OleDbDataAdapter adapter = new OleDbDataAdapter(Query,connectionString);
adapter.Fill(dt);
foreach (DataRow dr in dt.Rows)
{
cmbStudent.Items.Add(dr[0].ToString());
}
}
its saying no value given to one or more parameters .