搞了几天拉!还是没有解决啊!在线等待!!!!
nokir 2003-12-01 12:30:13 我和数据库的连接和打开已经成功了,但是我现在要的在数据库里查询数据,但是怎么搞也没有成功啊!我在查询时它给我的提示是:
错误类型:
ADODB.Recordset (0x800A0CC1)
在对应所需名称或序数的集合中,未找到项目。
/make/在Access数据库中查询数据.asp, 第 35 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
网页:
POST 18 ??? /make/在Access数据库中查询数据.asp
POST Data:
product_code=01123
我的代码是这样的,请大家帮我分析一下啊!
<%
'声明Recordset对象
Set RS=Server.CreateObject("ADODB.Recordset")
'打开数据库中的数据表 ,并使用 静态记录指针 ,也可以使用索引记录指针
RS.open "product" , DBConnection ,1,2
if Request("product_code") <> empty then
' 设置查询的数据的数据
Condition ="标号=' " & request("product_code") & " ' "
' 将寻找的条件指定给RS.Find
RS.Find =Condition ////////第 35 行
if RS.eof then
response.Write " 很抱歉!查无此标号为 "& request("product_code") & "的产品 "
else
response.Write " 查询到的产品如下:<br> <font size=2 color=blue> "
for i=0 to RS.FIelds.Count-1
response.Write RS(i) & "<br>"
next
response.Write " </font>"
end if
end if
%>