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!

Categories

ADO problem with ASP and ACCESS

antonsantons Posts: 117Member
Hi
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("<p>")
response.write(x.name)
response.write(" = ")
response.write(x.value)
response.write("")
next
rs.MoveNext
loop


rs.Close
adoCon.Close

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

Comments

  • antonsantons Posts: 117Member
    The problem seems to have gone away (by itself?).
    The only thing I can think of that changed, was that I relaxed the settings on my Panda firewall, because our network will take care of that.
    Have a nice day!!
Sign In or Register to comment.