P
poppy
I keep getting this error :
"System.Data.SqlClient.SqlException: Line 1: Incorrect
syntax near 'Name'."
Heres the code :
Sub BindData()
Dim sql As String = "Select Clientid,Client Name
from register order by Client Name"
Dim Cmd As New SqlCommand(sql, myConn)
Dim objDR As SqlDataReader
myConn.Open()
objDR = Cmd.ExecuteReader
(System.Data.CommandBehavior.CloseConnection)
Me.cboClient.DataSource = objDR
Me.cboClient.DataValueField = "EmployeeID"
Me.cboClient.DataTextField = "LastName"
Me.cboClient.DataBind()
Me.cboClient.SelectedIndex = 0
myConn.Close()
End Sub
Anyone help ?
"System.Data.SqlClient.SqlException: Line 1: Incorrect
syntax near 'Name'."
Heres the code :
Sub BindData()
Dim sql As String = "Select Clientid,Client Name
from register order by Client Name"
Dim Cmd As New SqlCommand(sql, myConn)
Dim objDR As SqlDataReader
myConn.Open()
objDR = Cmd.ExecuteReader
(System.Data.CommandBehavior.CloseConnection)
Me.cboClient.DataSource = objDR
Me.cboClient.DataValueField = "EmployeeID"
Me.cboClient.DataTextField = "LastName"
Me.cboClient.DataBind()
Me.cboClient.SelectedIndex = 0
myConn.Close()
End Sub
Anyone help ?