ASP Database Help
by Matthew Ohlman <matthew(at)ohlman.com>
|
Date: |
Mon, 29 Jul 2002 11:27:54 -0500 |
To: |
HWG-basics(at)hwg.org |
|
todo: View
Thread,
Original
|
|
Hi list. I was wondering if anybody could help me with an error in ASP,
where I am trying to make a guestbook with ASP and a MS Access database.
The error it gives me is:
Microsoft VBScript compilation error '800a03ee'
Expected ')'
/guestbook.asp, line 9
DSNtemp = dsntemp & "DBQ=" & server.mappath("guestbook.mdb)};"
here is my code:
---------------------
<.%
set conn = server.createobject("adobd.connection")
DSNtemp = "DRIVER={Microsoft Access Driver (*.mdb)};"
DSNtemp = dsntemp & "DBQ=" & server.mappath("guestbook.mdb)};"
conn.open DSNtemp
sqlstmt = "SELECT * from linksdata ORDER BY date DESC"
set rs = Server.CreateObject("ADOBD.Recordset")
rs.Open sqlstmt, con, 3, 3
TotalRecs = rs.recordcount
x = 0
For x = 1 to 9999
If rs.eof then
Exit For
Else
name = rs("name")
date = rs("date")
email = rs("email")
email = "<a href='malto:" & email & "'>" & website & "</a>"
website = rs("website")
website = "<a href='" & website & "'>" & website & "</a>"
comments = rs("comments")
webname = rs("WebName")
%.>
<.%
if IsEmpty(webname) or webname="" then
response.write(webname)
Else
response.write ""
End If
%.>
<.%
rs.MoveNext
End If
Next
%.>
--------------
Thanks. Matthew
| Matthew Ohlman
| Ohlman Pages
| http://www.ohlman.com/
"The most overlooked advantage to owning a computer is that if they foul up
there's no law against wacking them around a little."
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA