[求助]recordset的问题
很简单的代码:<%
dim conn
set conn=server.CreateObject("adodb.connection")
dim sql
sql="driver={microsoft access driver (*.mdb)};dbq=e:\aspstation\database\db1.mdb"
conn.open sql
if request.Form("name")<>"" then
dim rs,str
set rs=server.CreateObject("adodb.recordset")
str="select * from user where name='"&trim(request.Form("name"))&"'"
rs.open str,conn,1,1
if rs.recordcount<=0 then
response.Write("c")
else
response.Write("a")
end if
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
运行就提示:错误类型:
Microsoft VBScript 运行时错误 (0x800A01A8)
缺少对象: ''
如果把rs.close去掉就没问题了,大家帮我看看,为什么?我是个初学者,这个recordset对象不是一定要关闭的么?