G
Guest
Hi guys,
I'm getting error:-
System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near '='.
What could cause this ERRORR
My code below:-
Dim connString As String = "server=(local);database=Northwind;integrated
security=true;"
Dim objConnection As SqlConnection
objConnection = New SqlConnection(connString)
objConnection.Open()
Dim sSQL As String = "SELECT Sub_category_id,sub_category_text FROM
Sub_Category"
Dim objCommand As SqlCommand
objCommand = New SqlCommand(connString, objConnection)
Dim objDataReader As SqlDataReader
objDataReader =
objCommand.ExecuteReader(CommandBehavior.CloseConnection)
catlist.DataSource = objDataReader
catlist.DataBind()
I'm getting error:-
System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near '='.
What could cause this ERRORR
My code below:-
Dim connString As String = "server=(local);database=Northwind;integrated
security=true;"
Dim objConnection As SqlConnection
objConnection = New SqlConnection(connString)
objConnection.Open()
Dim sSQL As String = "SELECT Sub_category_id,sub_category_text FROM
Sub_Category"
Dim objCommand As SqlCommand
objCommand = New SqlCommand(connString, objConnection)
Dim objDataReader As SqlDataReader
objDataReader =
objCommand.ExecuteReader(CommandBehavior.CloseConnection)
catlist.DataSource = objDataReader
catlist.DataBind()