Solved

ASP Error when opening a connection to a database

Posted on 2002-04-16
4
407 Views
Last Modified: 2012-05-04
I have written an ASP page to display some data from an Access 97 database file.  When I run it on my Windows 98 machine with Person Web Server running, it works fine.  I took it home (where I do not have Access installed) and it works fine there also.  However when I try to run it from my Windows 2000 server I get:
HTTP 500.100 - Internal Server Error - ASP Error
Error in the DLL
reps.asp Line 20
Line 20 is where I try to open the connection:
adoConnection.Open("DSN=RepList");
I setup the DSN the same on the server as I did on my workstation.  I have tried DSN-less connection also like:
strConAccess = "Driver={Microsoft Access Driver(*.mdb)};DBQ=c:\Inetpub\database.mdb"
adoConnection.Open strConAccess
and I get the same error.  The folder I'm running the asp from does allow scripts to run.  I've tried adding the internet user to the admin group, so it shouldn't be a rights issue.  I've seen this question in a couple of places on the Internet but have not seen an answer yet.  Hopefully someone here can help me.  I have tried installing Access 97 on the server.  I get the same result on a different Win2K server.
0
Comment
Question by:johntegg
  • 2
4 Comments
 
LVL 20

Accepted Solution

by:
Silvers5 earned 200 total points
ID: 6944823
try to update the MDAC on the server

http://www.microsoft.com/data/download.htm



0
 
LVL 1

Expert Comment

by:bolox
ID: 6945144
I use this for my access database:

        set odatabase=server.CreateObject("ADODB.connection")
       odatabase.Open "DRIVER={MicroSoft Access Driver (*.mdb)};DBQ=" & server.MapPath("cgi-bin\database.mdb")

Set rslinktodbase=Server.CreateObject("ADODB.Recordset")
rslinktodbase.Open "SELECT competition.* FROM competition;",odatabase,adOpenKeyset,adLockPessimistic,adCmdText


so then for example....

<%
while not rslinktodbase.eof

response.write rslinktodbase("somefield")

rslinktodbase.movenext
wend

%>


Please be aware i am called bolox for a reason, so please do not be angry if this not what you want.

B



0
 

Author Comment

by:johntegg
ID: 6945259
Thanks for the info Bolox, but I am already past that part.  My server is the issue now.  I'll be upgrading the MDAC over lunch.
0
 

Author Comment

by:johntegg
ID: 6945761
That must have been it.  I didn't think of that because it worked on my Windows 98 machine.  After updating the MDAC to the newest version I set a default application in the IIS settings and it worked!
Thanks for the help.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Update table value with join syntax 2 76
Choose the older file FSO 6 49
If condition on Html with Asp 11 27
ASP exit 10 18
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question