Dim Conn
Set Conn = Server.CreateObject("Adodb.Connection")
Conn.Open ConnStr
Dim Sql
Sql="Select Top 5 xxxx From yyy Order By Id desc"
Dim Rs
Set Rs=Server.CreateObject("Adodb.RecordSet")
Rs.Open Sql,Conn,1,1
While Not Rs.EOF
Response.Write "document.write(""<li><a href='"&Rs("xxxx")&"'>"&Rs("xxx")&"</a></li>"");"
Rs.MoveNext
Wend
Rs.Close
Set Rs=Nothing
Conn.Close
Set Conn=Nothing