ADO problem with ASP and ACCESS - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

ADO problem with ASP and ACCESS

antonsantons Posts: 117Member
I'm trying to play around with ASP, and used ACCESS because its the only SQL database on my PC.
My problem is this: When I run the code (pasted below), it works the first time, but when I run it immediately again, it does not. Only after waiting a couple of seconds (not sure how long), it works again. The error seems to be where I open the DB connection.
My code:

Hello W3Schools!

Dim adoCon
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DSN=test"

set rs=Server.CreateObject("ADODB.recordset")
rs.Open "Select * from cust", adoCon

do until rs.EOF
for each x in rs.fields
response.write(" = ")


set rs = Nothing
set adoCon = Nothing

The error:
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services


Technical Information (for support personnel)

Error Type:
Provider (0x80004005)
Unspecified error
/MyWeb/dynpage.asp, line 8

Thank you


Sign In or Register to comment.