Solved

ASP Error when opening a connection to a database

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

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…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

786 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