mevada kamlesh

mevada kamlesh

  • NA
  • 66
  • 28.2k

Unclosed quotation mark after the character string ''. error

May 2 2018 1:49 AM
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: System.Data.SqlClient.SqlException: Unclosed quotation mark after the character string ''.
 
Source Error:
 
Line 70: SqlCommand cmd = new SqlCommand("update users set
Password='" + tbNewPass.Text + "' where Uid=" + Uid + "'", con);
Line 71: con.Open();
Line 72: cmd.ExecuteNonQuery();
Line 73: SqlCommand cmd2 = new SqlCommand("delete from ForgotPassRequests where Uid='" + Uid + "'", con);
Line 74: cmd2.ExecuteNonQuery();
 
Source File: e:\My Website\firstWebsite\RecoverPassword.aspx.cs Line: 72 

Answers (1)