Advertisement

09.05.2007 at 07:31AM PDT, ID: 22808041
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

vbscript, Microsoft OLE DB Provider for ODBC Drivers error '80040e21' / ODBC driver does not support the requested properties.

Asked by ksuchy in VB Database Programming, Microsoft Access Database

Tags: , , , ,

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("userid") <> "" then
   u_id =Request.QueryString("userid")
   'u_auth = Request.QueryString("u_auth")
   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.connection")
set rs = server.createobject("adodb.recordset")
set rs1 = server.createobject("adodb.recordset")
set rs2 = server.createobject("adodb.recordset")
'MdbFilePath=server.mappath("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
[+][-]09.05.2007 at 07:57AM PDT, ID: 19832940

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2007 at 11:23AM PDT, ID: 19834573

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.05.2007 at 03:28PM PDT, ID: 19836255

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Database Programming, Microsoft Access Database
Tags: odbc, provider, ole, db, error
Sign Up Now!
Solution Provided By: LSMConsulting
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628