Aaron
Sun May 09 11:53:44 CDT 2004
<%
// you'll need to fix this line:
dbPath = Server.MapPath("/file.mdb")
Set conn = CreateObject("ADODB.Connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath
sql = "SELECT TOP 10 Titles FROM DVD ORDER BY Title DESC"
Set rs = conn.execute(sql)
do while not rs.eof
response.write rs(0) & "<br>"
rs.movenext
loop
rs.close: set rs = nothing
conn.close: set conn = nothing
%>
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"donald" <donaldmarshall@ntlworld.com> wrote in message
news:OCGG9hZNEHA.3988@TK2MSFTNGP09.phx.gbl...
> Did it again sorry not with it today, I had already tried
> <%
> Response.Write(SELECT TOP 10 Titles FROM DVD ORDER BY Title DESC)
> %>
>
> but that just gives me a 500.100 error saying
>
> Error Type:
> Microsoft JScript compilation (0x800A03EE)
> Expected ')'
> /index.asp, line 21, column 22
> Response.Write(SELECT TOP 10 Titles FROM DVD ORDER BY Title DESC)
>
> Thanks for any help much appreciated.
>
>