I am NOT a VBScript or db expert, but I understand them conceptually. I will need some handholding on this (sorry), so please make instructions highly detailed, or give me links to other references. A client of mine has code which previously worked fine (for several years). They claim no modifications to the code have been made. After I migrated my web server from 2000 (IIS 5) to 2003 (IIS 6), most sites continued to work fine, except for one which uses ASP and MS Access.
Here is the exact error I'm getting returned to the browser, when I enter a known good UserID/PW on a page called logon.asp (debugging turned on for this test):
-------------//begin snip//--------------------
Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
ODBC driver does not support the requested properties.
/xxxxPATHxxx//list.asp, line 27
-------------//end snip//--------------------
Here is the relevant code from logon.asp:
-------------//begin snip//--------------------
<script language="javascript">
<!--
function err(){
if (document.frm.u_id.value == ''){
alert("Insert your User ID")
return false
}
if (document.frm.u_pwd.value == ''){
alert("Insert your Password")
return false
} }
'lots of stuff here in the middle of the page, then below the form starts
<form name="frm" action="./path//list.asp" method="post" onsubmit="return err()">
-------------//end snip//--------------------
Here is the relevant code from list.asp
-------------//begin snip//--------------------
<!--#include file="./../topconn.inc"-->
<%
dim conn
dim rs
dim rs1
' When parameters are gotten from form type, that is, the logon page
'if 'Request.Form("u_id") = "" and Request.Form("u_pwd") = "" then
if Request.QueryString("useri
d") <> "" then
u_id =Request.QueryString("user
id")
'u_auth = Request.QueryString("u_aut
h")
query1 = "SELECT * FROM user WHERE u_id='"&u_id&"'"
end if
'else
' When parameters are gotten from querystring type
if Request.Form("u_id") <>"" and Request.Form("u_pwd") <> "" then
u_id = Request.Form("u_id")
u_pwd = Request.Form("u_pwd")
query1 = "SELECT * FROM user WHERE u_id='"&u_id&"' and u_pwd='"&u_pwd&"'"
end if
conn.open strconn
rs.open query1, conn, 1
'note that the above rs.open command is the infamous line 27
-------------//end snip//--------------------
Lastly, here is the topconn.inc
-------------//begin snip//--------------------
<%
set conn = server.createobject("adodb
.connectio
n")
set rs = server.createobject("adodb
.recordset
")
set rs1 = server.createobject("adodb
.recordset
")
set rs2 = server.createobject("adodb
.recordset
")
'MdbFilePath=server.mappat
h("sjk.mdb
")
'conn.open "driver={microsoft access driver (*.mdb)}; dbq="&mdbfilepath&";"
strconn = "oledb=microsoft access;server=###.###.##.#
##;uid=sa;
pwd=XXXXX;
dsn=sjk"
%>
-------------//begin snip//--------------------
IMPORTANT: For the purpose of testing, I gave IUSR full control over the entire folder where the MS Access db, and all file are located, then forced inheritance down NTFS. Note also that I went back in and recreated the system DSN myself to ensure it was setup correctly.
Start Free Trial