ADO Programming

Moderators: None (Apply to moderate this forum)
Number of threads: 87
Number of posts: 225

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
ADO problem with ASP Windows Vista Posted by walter1 on 25 Sept 2008 at 6:35 PM
Hi
I'm trying some examples from w3schools: ASP, ADO, ACCESS with Windows Vista.
The problem is this: When I run the code (pasted below), the connection method Open generates an error HTTP 500. It never worked, nor if I used ODBC.
Using Visual Basic with the same code (without "Server." and so on), always worked.
My code:
<html>
<body>

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
'The next statement causes the error
conn.Open(Server.Mappath("/db/northwind.mdb"))
'set rs = Server.CreateObject("ADODB.recordset")
'rs.Open "Select * from Customers", conn

'do until rs.EOF
' for each x in rs.Fields
' Response.Write(x.name)
' Response.Write(" = ")
' Response.Write(x.value & "<br />")
' next
' Response.Write("<br />")
' rs.MoveNext
'loop

'rs.close
'conn.close
%>

</body>
</html>



 

Recent Jobs