Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

When I enter in aaa'aaa4"4aaa then try to excute the save query, I received the following error. I believe this is caused by the text sting going into the query text. Is there anyway around this error?

 

 

 

Server Error in '/' Application.

--------------------------------------------------------------------------------

 

Line 1: Incorrect syntax near 'aa1'. Unclosed quotation mark before the character string ''.

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: Line 1: Incorrect syntax near 'aa1'. Unclosed quotation mark before the character string ''.

Source Error:

 

 

Line 136: dim Cmd as new SQLCommand(strSQL,conn)

Line 137: Cmd.connection.open()

Line 138: Cmd.ExecuteNonQuery()

Line 139: Cmd.connection.close()

Line 140:

 

 

Source File: D:\GrantManagementWeb\GrantAddNew.aspx Line: 138

 

Stack Trace:

 

 

[sqlException: Line 1: Incorrect syntax near 'aa1'.

Unclosed quotation mark before the character string ''.]

System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +180

ASP.GrantAddNew_aspx.ExeStatement(Object strSQL) in D:\GrantManagementWeb\GrantAddNew.aspx:138

ASP.GrantAddNew_aspx.dataSave_onClick(Object Sender, EventArgs e) in D:\GrantManagementWeb\GrantAddNew.aspx:128

System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108

System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57

System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18

System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33

System.Web.UI.Page.ProcessRequestMain() +1292

 

 

 

 

--------------------------------------------------------------------------------

Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300 :confused: :confused:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...