try { byte[] imageData = ReadFile(txt_image.Text); if (masked_txt_codem.MaskCompleted == false && txt_image.Text ==string.Empty) { errorProvider1.SetError(masked_txt_codem, "please "); errorProvider1.SetError(txt_image, "please"); } else { errorProvider1.Clear(); OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + strcon); con.Open(); OleDbCommand comm = new OleDbCommand(); comm.Connection = con; comm.CommandType = CommandType.Text; comm.CommandText = "UPDATE janbaz set fname='" + txt_name.Text + "' ,lname ='" + txt_famili.Text + "' ,father_name='" + txt_father.Text + "',birth_date='" + masked_birth_date.Text + "',tahsilat='" + txt_tahsilat.Text + "' ,codem='" + masked_txt_codem.Text + "' , codesh='" + txt_codeshean.Text + "' ,place_tavalod='" + txt_address_work.Text +<big> "' ,[image] = @image</big> where codem='" + masked_txt_codem.Text + "'"; comm.Parameters.Add(new OleDbParameter("@image", (object)imageData)); MessageBox.Show("success"); comm.ExecuteNonQuery(); con.Close(); comm.Dispose(); } } catch (ArgumentException) { errorProvider1.SetError(txt_image, "prob"); }
Could not save; currently locked by another user
...\bin\debug
...\bin\release
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)