"Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done." error when combobox selected index changed
Hi,
Can anybody help me please how to solve this problem: When selecting a value from the combobox I got an error "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."
Here is my code for the event:
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
DataSet3 _dataset = new DataSet3();
OleDbCommand com1 = new OleDbCommand();
com1.Connection = conn;
com1.CommandText = "Select * from Dogovor where Komint=? order by Brdog";
com1.Parameters.AddWithValue("@Komint", comboBox3.SelectedValue);
OleDbDataAdapter oleDBDataAdapter1 = new OleDbDataAdapter(new OleDbCommand(com1.CommandText, conn));
try
{
//conn.Open();
com1.ExecuteNonQuery();
comboBox2.DataSource = _dataset.Tables["Dogovor"];
comboBox2.DisplayMember = "Brdog";
/ oleDBDataAdapter1.Fill(_dataset, "Komint");
}
finally
{
conn.Close();
}
textBox1.Focus();
}
Thank you very much in advance.