我编了一段ASP程序想调用一下数据库,以下是我的编码,数据库叫db1.mdb,里面有张表叫person
<%
set cn=server.CreateObject("adodb.connection"
cn.open "driver={microsoft access driver (*.mdb)};dbq=" & server.mappath("db1.mdb" & ";"
set rs=server.CreateObject("adodb.recordset"
srtquery="select * from person"
rs.open strquery,cn
if rs.eof then
response.Write("没有查到记录"
else
do while not rs.eof
response.write"<p>" & "<h3>" & rs("name"
& "</h3>"
response.write"性别:" & rs("sex" )& ""
response.write"年龄:" & rs("age" )& ""
response.write"地址:" & rs("addr" )& ""
response.write"电话:" & rs("phone"
& ""
response.write"Email:" & rs("email" )& ""
response.write"爱好:" & rs("hobby" )
rs.movenext
loop
end if
rs.close
set rs=nothing
%>可是出现了以下错误
错误类型:
ADODB.Recordset (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。请问大哥们如何改啊