Solved

ASP Error when opening a connection to a database

Posted on 2002-04-16
4
396 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now