?
Solved

ASP Error when opening a connection to a database

Posted on 2002-04-16
4
Medium Priority
?
413 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:
Michel Sakr earned 800 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Integration Management Part 2
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month15 days, 2 hours left to enroll

839 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