try
{
OleDbConnection connection = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;" + @"Data Source=c:\Users\PC\Documents\Visual Studio 2013\Projects\WindowsFormsApplication1\WindowsFormsApplication1\Main database.accdb");
connection.Open();
OleDbCommand lala = new OleDbCommand();
lala.Connection = connection;
string query = "SELECT * FROM [Firebird m0 Damage];";
lala.CommandText = query;
OleDbDataReader reader = lala.ExecuteReader();
while (reader.Read())
{
var parameter = new OleDbParameter("@Totalprice", OleDbType.SmallInt);
parameter.Value = "comboBox6.SelectedValue";
lala.Parameters.Add(parameter);
textBox15.Text = reader["Totalprice"].ToString();
}
connection.Close();
}
catch (Exception es)
{
MessageBox.Show("Error " + es);
}
}
Im trying to return all the rows of the column to textbox when a list is selected from combobox, it only returns 1 value