在ASP网页表格中怎么获取SQL数据库字段值

在图中表格里获取SQL数据
查询表trans中和date字段(和系统日期一致的)
WHERE (YEAR([Date]) = YEAR({ fn NOW() })) AND (MONTH([Date]) = MONTH({ fn NOW() }))
AND (DAY([Date]) = DAY({ fn NOW() }))

root字段中的房间号
WHERE (Room > 301) AND (Room < 711)

tanascode字段(小于3的值)
WHERE (TransCode <= 2)

amount字段(中小于1大于500的值)
WHERE (Amount > 0) AND (Amount < 500)

最后表中显示:

系统时间(date) 房间号(room) 账项代码(tanascode) 房费(amount)小于 大于 重复

备注:只获取和系统日期一致的房间号,提取该房间号中符合账项代码的房费,在表格中显示。

数据库名:hy2006qt
表名:trans
四个字段:系统时间(date) 房间号(room) 账项代码(tanascode) 房费(amount)

 你用ado查询数据库,将结果填入表格:
<table>
<th>
    <td>日期</td>
        <td>房号</td>
        ...
</th>
<tr>
<% while not rs.eof %>
    <td><% rs!字段1 %></td>
        <td><% rs!字段2 %></td>
        ...
<% wend %>
</tr>