hi guys
i developing an application on asp.net and database sql server 2000 ... i'm getting the error below
System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near '='.
can anyone pls advise me how to correct it and why it comes
did lot of research about it but not suceeding at alll
manu
Comments
: i developing an application on asp.net and database sql server 2000 ... i'm getting the error below
:
: System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near '='.
:
: can anyone pls advise me how to correct it and why it comes
:
: did lot of research about it but not suceeding at alll
:
: manu
:
:
I can not help you till i see your source code.
I suggest you exam your code seriously and pay attention to the ''' in your code.
: : i developing an application on asp.net and database sql server 2000 ... i'm getting the error below
: :
: : System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near '='.
: :
: : can anyone pls advise me how to correct it and why it comes
: :
: : did lot of research about it but not suceeding at alll
: :
: : manu
: :
: :
: I can not help you till i see your source code.
: I suggest you exam your code seriously and pay attention to the ''' in your code.
:
Hi digitalmonk
thousand times thanks for answering .. i was thinkinh that i'm a gone case and no one gonna answer me ..
in fact this syntax error i'm getting it with many codes(code behind web forms) whereby i'm adding, modifying or deleting an element in the sql server 2000 database
i check out on the net about this error and many places i saw that i gotta install service pack 2 and 3
i'm pasting one example which arises in my forum code
Here it is
Server Error in '/WebAppTest' Application.
--------------------------------------------------------------------------------
Line 1: Incorrect syntax near '='.
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 '='.
Source Error:
Line 64: MessageCommand.Parameters.Add(New SqlParameter("@Thread_ID", SqlDbType.Int))
Line 65: MessageCommand.Parameters("@Thread_ID").Value = CInt(Request.QueryString("Thread_ID"))
Line 66: MessageRepeater.DataSource = MessageCommand.ExecuteReader
Line 67: MessageRepeater.DataBind()
Line 68: MsgCn.Close()
Source File: d:inetpubwwwrootWebAppTestMessage.aspx.vb Line: 66
Stack Trace:
[SqlException: Line 1: Incorrect syntax near '='.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
System.Data.SqlClient.SqlCommand.ExecuteReader()
WebAppTest.Message.BindData() in d:inetpubwwwrootWebAppTestMessage.aspx.vb:66
WebAppTest.Message.Page_Load(Object sender, EventArgs e) in d:inetpubwwwrootWebAppTestMessage.aspx.vb:56
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
ANOTHER EXAMPLE WHERE I GET THE SAME PROBLEM:
Server Error in '/WebAppTest' Application.
--------------------------------------------------------------------------------
Line 1: Incorrect syntax near '='.
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 '='.
Source Error:
Line 225: Dim cmmUpdate As New SqlCommand(sSQLUpdate, studentCn)
Line 226: Dim iRet As Integer
Line 227: iRet = cmmUpdate.ExecuteNonQuery()
Line 228: If studentCn.State = ConnectionState.Open Then
Line 229: studentCn.Close()
Source File: d:inetpubwwwrootWebAppTestStudentManagement.aspx.vb Line: 227
i am crossing my fingers to get a solution for that
Thanks beforehand
manu
: : : i developing an application on asp.net and database sql server 2000 ... i'm getting the error below
: : :
: : : System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near '='.
: : :
: : : can anyone pls advise me how to correct it and why it comes
: : :
: : : did lot of research about it but not suceeding at alll
: : :
: : : manu
: : :
: : :
: : I can not help you till i see your source code.
: : I suggest you exam your code seriously and pay attention to the ''' in your code.
: :
:
: Hi digitalmonk
: thousand times thanks for answering .. i was thinkinh that i'm a gone case and no one gonna answer me ..
:
: in fact this syntax error i'm getting it with many codes(code behind web forms) whereby i'm adding, modifying or deleting an element in the sql server 2000 database
:
: i check out on the net about this error and many places i saw that i gotta install service pack 2 and 3
:
: i'm pasting one example which arises in my forum code
:
: Here it is
:
: Server Error in '/WebAppTest' Application.
: --------------------------------------------------------------------------------
:
: Line 1: Incorrect syntax near '='.
: 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 '='.
:
: Source Error:
:
:
: Line 64: MessageCommand.Parameters.Add(New SqlParameter("@Thread_ID", SqlDbType.Int))
: Line 65: MessageCommand.Parameters("@Thread_ID").Value = CInt(Request.QueryString("Thread_ID"))
: Line 66: MessageRepeater.DataSource = MessageCommand.ExecuteReader
: Line 67: MessageRepeater.DataBind()
: Line 68: MsgCn.Close()
:
:
: Source File: d:inetpubwwwrootWebAppTestMessage.aspx.vb Line: 66
:
: Stack Trace:
:
:
: [SqlException: Line 1: Incorrect syntax near '='.]
: System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
: System.Data.SqlClient.SqlCommand.ExecuteReader()
: WebAppTest.Message.BindData() in d:inetpubwwwrootWebAppTestMessage.aspx.vb:66
: WebAppTest.Message.Page_Load(Object sender, EventArgs e) in d:inetpubwwwrootWebAppTestMessage.aspx.vb:56
: System.Web.UI.Control.OnLoad(EventArgs e)
: System.Web.UI.Control.LoadRecursive()
: System.Web.UI.Page.ProcessRequestMain()
:
:
:
:
: --------------------------------------------------------------------------------
: Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
:
:
: ANOTHER EXAMPLE WHERE I GET THE SAME PROBLEM:
: Server Error in '/WebAppTest' Application.
: --------------------------------------------------------------------------------
:
: Line 1: Incorrect syntax near '='.
: 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 '='.
:
: Source Error:
:
:
: Line 225: Dim cmmUpdate As New SqlCommand(sSQLUpdate, studentCn)
: Line 226: Dim iRet As Integer
: Line 227: iRet = cmmUpdate.ExecuteNonQuery()
: Line 228: If studentCn.State = ConnectionState.Open Then
: Line 229: studentCn.Close()
:
:
: Source File: d:inetpubwwwrootWebAppTestStudentManagement.aspx.vb Line: 227
:
:
:
:
: i am crossing my fingers to get a solution for that
:
: Thanks beforehand
: manu
:
:
I am sorry that i am so late to reply you
I look at your code seariously and did not find any errors.
I think it is the error of your storeProcedure
but i am not sure.
if you solute the Problem, please tell me what the wrong is ?
: : : : i developing an application on asp.net and database sql server 2000 ... i'm getting the error below
: : : :
: : : : System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near '='.
: : : :
: : : : can anyone pls advise me how to correct it and why it comes
: : : :
: : : : did lot of research about it but not suceeding at alll
: : : :
: : : : manu
: : : :
: : : :
: : : I can not help you till i see your source code.
: : : I suggest you exam your code seriously and pay attention to the ''' in your code.
: : :
: :
: : Hi digitalmonk
: : thousand times thanks for answering .. i was thinkinh that i'm a gone case and no one gonna answer me ..
: :
: : in fact this syntax error i'm getting it with many codes(code behind web forms) whereby i'm adding, modifying or deleting an element in the sql server 2000 database
: :
: : i check out on the net about this error and many places i saw that i gotta install service pack 2 and 3
: :
: : i'm pasting one example which arises in my forum code
: :
: : Here it is
: :
: : Server Error in '/WebAppTest' Application.
: : --------------------------------------------------------------------------------
: :
: : Line 1: Incorrect syntax near '='.
: : 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 '='.
: :
: : Source Error:
: :
: :
: : Line 64: MessageCommand.Parameters.Add(New SqlParameter("@Thread_ID", SqlDbType.Int))
: : Line 65: MessageCommand.Parameters("@Thread_ID").Value = CInt(Request.QueryString("Thread_ID"))
: : Line 66: MessageRepeater.DataSource = MessageCommand.ExecuteReader
: : Line 67: MessageRepeater.DataBind()
: : Line 68: MsgCn.Close()
: :
: :
: : Source File: d:inetpubwwwrootWebAppTestMessage.aspx.vb Line: 66
: :
: : Stack Trace:
: :
: :
: : [SqlException: Line 1: Incorrect syntax near '='.]
: : System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
: : System.Data.SqlClient.SqlCommand.ExecuteReader()
: : WebAppTest.Message.BindData() in d:inetpubwwwrootWebAppTestMessage.aspx.vb:66
: : WebAppTest.Message.Page_Load(Object sender, EventArgs e) in d:inetpubwwwrootWebAppTestMessage.aspx.vb:56
: : System.Web.UI.Control.OnLoad(EventArgs e)
: : System.Web.UI.Control.LoadRecursive()
: : System.Web.UI.Page.ProcessRequestMain()
: :
: :
: :
: :
: : --------------------------------------------------------------------------------
: : Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
: :
: :
: : ANOTHER EXAMPLE WHERE I GET THE SAME PROBLEM:
: : Server Error in '/WebAppTest' Application.
: : --------------------------------------------------------------------------------
: :
: : Line 1: Incorrect syntax near '='.
: : 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 '='.
: :
: : Source Error:
: :
: :
: : Line 225: Dim cmmUpdate As New SqlCommand(sSQLUpdate, studentCn)
: : Line 226: Dim iRet As Integer
: : Line 227: iRet = cmmUpdate.ExecuteNonQuery()
: : Line 228: If studentCn.State = ConnectionState.Open Then
: : Line 229: studentCn.Close()
: :
: :
: : Source File: d:inetpubwwwrootWebAppTestStudentManagement.aspx.vb Line: 227
: :
: :
: :
: :
: : i am crossing my fingers to get a solution for that
: :
: : Thanks beforehand
: : manu
: :
: :
:
: I am sorry that i am so late to reply you
: I look at your code seariously and did not find any errors.
: I think it is the error of your storeProcedure
: but i am not sure.
: if you solute the Problem, please tell me what the wrong is ?
:
it's ok no probs if u couldn't make it earlier and as u told me i revised all my sql statements and noticed that same statement is written differently in different books i tried all and thank God one of them worked :-)
thanks manu
Its the SQL part that is causing the problem.Debug the program and collect the sql string and then run the sql in sql server.It will help u to detect the error.
shatlin
: Its the SQL part that is causing the problem.Debug the program and collect the sql string and then run the sql in sql server.It will help u to detect the error.
:
: shatlin
:
:
:
Hi shatlin
thanks for answering, i'm very grateful, and your solution is right ... since i solve the error as u said itself.
thanks again have a nice time
manu