Author: vitaly87 | Posted on: 4/2/2010 1:23:21 PM | Views : 199

hello i wrote a code to insert a values to db. but have problem to check if the id or Idcertificate is a new one. but the program dont do this. and i dont have any errors.
the commend is:
cmd.CommandText = "select * from [lecturer] where Id = '" + id.Text + "' or Idcertificate = '" + idLicense.Text + "'";

and i dont get what wrong is here, i dont get true in the function checkId i think it is because of the or in the commandText..
all the code is:
protected void Button1_Click(object sender, EventArgs e) { if (checkId()) { Response.Write("<script type=\"text/javascript\">alert('" + "?''? ??? ???? ??????" + "');</script>"); } if (checkId()) { Response.Write("<script type=\"text/javascript\">alert('& ...

Go to the complete details ...