ASP error - help!

Associate
Joined
10 Nov 2004
Posts
87
Location
Kent, England
Hi there,

I am trying to read records from a database on an asp page. My current code is:

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("fpdb/WebSite.mdb"))
set rs = Server.CreateObject("ADODB.recordset")
rs.Open "Select faqid from tblFAQ", conn

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

rs.close
conn.close
%>


-- Getting.

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'faqid'

/bradleygallery/index.asp, line 19

Where have I gone wrong?
 
To find wherre the bug is, you could try and replace your conn.open line with something in this format:

conn.Open "c:/webdata/northwind.mdb"

If that works, you'll know it's sometihng wrong with your map function.
 
Back
Top Bottom