你参考一下下面这段代码吧
<%
set conn=server.createobject("adodb.connection")
connstr="driver="{sql server}; server=你的服务器名;uid=sa;pwd=;database=你的数据库名"
set rs=server.createobject("adodb.recordset")
sql="select * from tablename "
rs.open sql,conn,1,1
do while not rs.eof
response.write rs("字段名")
rs.movenext
loop
rs.close
%>