I need to understand why this code doesnt work properly when I need to edit the segund time (after to click on my button). See what error message I receive:
conn = new OleDbConnection(connstr); // Its sturk here only when I click to edit for the segond time with others datas
comm = new OleDbCommand();
conn.Open();
OleDbParameter s = new OleDbParameter("@s", SqlDbType.VarChar);
OleDbParameter id = new OleDbParameter("@id", SqlDbType.VarChar);
comm.Parameters.Add(s);
comm.Parameters.Add(id);
s.Value = '-';
id.Value = lblId.Text;
comm.Connection = conn;
comm.CommandText = "UPDATE fluxocaixa SET s = ? WHERE (id = ?)";
comm.ExecuteNonQuery();
{
conn.Close();
}