Hi,
I'm connecting to a text file on the server using an asp form. I load the data to a couple of list boxes for the user to complete. I have had a message box 'access denied' displayed, but this has only happend two or three times (for me). I'm using the following connection string.
Dim sDSNFile, sScriptDir
sScriptDir = Request.ServerVariables("SCRIPT_NAME")
sScriptDir = StrReverse(sScriptDir)
sScriptDir = Mid(sScriptDir, InStr(1, sScriptDir, "/"))
sScriptDir = StrReverse(sScriptDir)
sUser = Request.ServerVariables("REMOTE_USER")
UserID = UCase(Mid(sUser, InStr(sUser, "\") + 1, Len(sUser) - InStr(sUser, "\") + 1))
Dim sPath
sPath = Server.MapPath(sScriptDir) & "\"
strConnect = "Provider=MSDASQL; Driver={Microsoft Text Driver (*.txt; *.csv)}; DBQ=" & sPath & ";"
Dim conn, rs
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open strConnect
any ideas why this happens????
I'm connecting to a text file on the server using an asp form. I load the data to a couple of list boxes for the user to complete. I have had a message box 'access denied' displayed, but this has only happend two or three times (for me). I'm using the following connection string.
Dim sDSNFile, sScriptDir
sScriptDir = Request.ServerVariables("SCRIPT_NAME")
sScriptDir = StrReverse(sScriptDir)
sScriptDir = Mid(sScriptDir, InStr(1, sScriptDir, "/"))
sScriptDir = StrReverse(sScriptDir)
sUser = Request.ServerVariables("REMOTE_USER")
UserID = UCase(Mid(sUser, InStr(sUser, "\") + 1, Len(sUser) - InStr(sUser, "\") + 1))
Dim sPath
sPath = Server.MapPath(sScriptDir) & "\"
strConnect = "Provider=MSDASQL; Driver={Microsoft Text Driver (*.txt; *.csv)}; DBQ=" & sPath & ";"
Dim conn, rs
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open strConnect
any ideas why this happens????