Incorrect syntax near 's'.
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
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: Incorrect syntax near 's'.
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
Without seeing your sql string, let me guess: You're building a sql string dynamically, including TextBox.Text inputs, and you didn't escape single quotes.
Right?
If not, please post the sql string that generated the error.
cno_kh
Member
89 Points
277 Posts
Incorrect syntax near 's'.
Oct 05, 2010 07:40 AM|LINK
Server Error in '/New Folder (2)' Application.
Incorrect syntax near 's'.
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.Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near 's'.
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
Source Error:
ASP.NET 2.0 update command
KumarHarsh
All-Star
15133 Points
3647 Posts
Re: Incorrect syntax near 's'.
Oct 05, 2010 10:54 AM|LINK
Inpite of error message you hv to explain when exactly this error occur.
refer this,
http://forums.asp.net/p/1602479/4083610.aspx#4083610
http://forums.asp.net/p/1596284/4050294.aspx#4050294
Kumar Harsh
TabAlleman
All-Star
15557 Points
2698 Posts
Re: Incorrect syntax near 's'.
Oct 05, 2010 04:10 PM|LINK
Without seeing your sql string, let me guess: You're building a sql string dynamically, including TextBox.Text inputs, and you didn't escape single quotes.
Right?
If not, please post the sql string that generated the error.
tugberk_ugur...
Participant
1944 Points
1344 Posts
MVP
Re: Incorrect syntax near 's'.
Oct 05, 2010 08:01 PM|LINK
post your code and maybe someone will figure out then :)
tweets as @tourismgeek
Hong-Gang Ch...
All-Star
74696 Points
6768 Posts
Re: Incorrect syntax near 's'.
Oct 11, 2010 06:45 AM|LINK
In order help you , could you post your code here?
If you have any feedback about my replies,please contactmsdnmg@microsoft.com.
Microsoft One Code Framework
riswadkarhar...
Contributor
2458 Points
561 Posts
Re: Incorrect syntax near 's'.
Oct 11, 2010 06:51 AM|LINK
Hi,
Can you pls post the line of code at which this error is thrown?
----------------------------------------------------------
Please mark as answer if the post helped you.