标题: [求助]程序调试出错 [打印本页] 作者: 【洳☆淉】 时间: 2010-1-19 04:05 标题: [求助]程序调试出错 新手查询数据库,出现错误,代码如下:
<%
dim conn,rs
Set conn=Server.CreateObject("ADODB.Connection")
provider="Provider=Microsoft.Jet.OLEDB.4.0;"
base="Data Source=" & Server.Mappath("we.mdb")
Set rs=Server.CreateObject("ADODB.Recordset")
conn.Open provider & base
sql="Select * from txt"
rs.Open sql,conn,1,3
Response.Write"<table>"
Response.Write"<tr>"
For i=0 to rs.Fields.Count-1
Response.Write"<td>"&rs(i).Name&"</td>"
Next
Do While Not rs.EOF
Response.Write"<td>"& rs(i).Value &"</td>"
rs.MoveNext
Loop
Response.Write"</tr>"
Response.Write"</table>"
%>