Can anyoe tell me why i get the error message;
Data source name too long with this piece of code?
<%
Response.Buffer = True
strUser = Request.ServerVariables("LOGON_USER"
' *********
Dim sDSNFile
Dim sPath, sDSN
sDSN = Server.MapPath("c:\windows\testme\employees\EmpComms.txt"
Dim conn, rs
Set conn = Server.CreateObject("ADODB.Connection"
conn.Open sDSN
Dim sql
sql = "SELECT User FROM EmpComms.txt WHERE User = strUser"
set rs = conn.execute(sql)
Do While Not rs.EOF
if strUser <> User then
end if
Loop
rs.close
set rs = nothing
conn.close
set conn = nothing
KISS - Keep It Simple Sugar!
Data source name too long with this piece of code?
<%
Response.Buffer = True
strUser = Request.ServerVariables("LOGON_USER"
' *********
Dim sDSNFile
Dim sPath, sDSN
sDSN = Server.MapPath("c:\windows\testme\employees\EmpComms.txt"
Dim conn, rs
Set conn = Server.CreateObject("ADODB.Connection"
conn.Open sDSN
Dim sql
sql = "SELECT User FROM EmpComms.txt WHERE User = strUser"
set rs = conn.execute(sql)
Do While Not rs.EOF
if strUser <> User then
end if
Loop
rs.close
set rs = nothing
conn.close
set conn = nothing
KISS - Keep It Simple Sugar!