Re: ASP Database Help
by "Stephanie Thrasher" <steph(at)omsoft.com>
|
Date: |
Mon, 29 Jul 2002 22:10:27 -0700 |
To: |
<HWG-basics(at)hwg.org>, "Matthew Ohlman" <matthew(at)ohlman.com> |
References: |
ohlman |
|
todo: View
Thread,
Original
|
|
Matthew,
I don't know ASP very well, but could this be what you need for that line?:
DSNtemp = dsntemp & "DBQ=" & server.mappath("guestbook.mdb")
Stephanie
> 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