Feroz Khan

Feroz Khan

  • NA
  • 63
  • 15.5k

How can i check with update query id colum...

Mar 24 2015 3:20 PM
please see below code every things is ok data updating but for example i want to update data where id  = txtbox when i type the id in textbox which id is available in the table is showing data successfully no issue but which id is not available in the table yet showing update successfully
so please help me about this issue, how can i check id is available or not..  if not show id is not matching...

 OracleCommand cmd = new OracleCommand("Update pa_em set TS_CRT_PW='05-Mar-15',  NUMB_DYS_VLD='360', numb_fld_pw = '0', pw_acs_em = '1289464',  where id  = '" + emp_userid_txt.Text + "'", con);
  OracleDataReader reader = cmd.ExecuteReader();
  MessageBox.Show("Record Updated", "Updated", MessageBoxButtons.OK, MessageBoxIcon.Information);
  while (reader.Read())
  {

  }

Answers (4)