?
Solved

ASP Error when opening a connection to a database

Posted on 2002-04-16
4
Medium Priority
?
411 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 20

Accepted Solution

by:
Silvers5 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

765 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