I just started with asp.net and i am having some problems defining the SQL statement. In the code i search the login account and i want this login name to filter the datagrid but there i get some errors
Sub page_load(Sender As Object, E As EventArgs)
Dim oConn as oledbconnection
Dim oCmd As OleDbCommand
Dim oParam as OleDbParameter
Dim sSQL As String
Dim objDataReader as OleDbDataReader
Dim arrSomething, strXPUser
arrSomething = split(Request.ServerVariables("LOGON_USER"),"\")
strXPUser = arrSomething(1)
response.Write(strXPUser)
oConn = new oledbconnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=C:\Inetpub\oConn.open()
sSQL = “SELECT * FROM tblpersoneel” 'WHERE [Personeelslidinlognaam] = strXPUser”
oCmd = New OleDbCommand(sSQL, oConn)
it must be a wrong use of the where clause but i can't find the answer. Hope someone can help me out here
Thanks borracho
Sub page_load(Sender As Object, E As EventArgs)
Dim oConn as oledbconnection
Dim oCmd As OleDbCommand
Dim oParam as OleDbParameter
Dim sSQL As String
Dim objDataReader as OleDbDataReader
Dim arrSomething, strXPUser
arrSomething = split(Request.ServerVariables("LOGON_USER"),"\")
strXPUser = arrSomething(1)
response.Write(strXPUser)
oConn = new oledbconnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=C:\Inetpub\oConn.open()
sSQL = “SELECT * FROM tblpersoneel” 'WHERE [Personeelslidinlognaam] = strXPUser”
oCmd = New OleDbCommand(sSQL, oConn)
it must be a wrong use of the where clause but i can't find the answer. Hope someone can help me out here
Thanks borracho