国外儿童摄影大师:asp查询语句错误,不知道什么问题

来源:百度文库 编辑:神马品牌网 时间:2024/05/03 09:59:51
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/conn_bargain.asp" -->
<!--#include file="chk_login.asp" -->
<!--#include file="chk_level1.asp" -->
<%
Dim rsb__mmname
rsb__mmname = "%"
If (request.form("hr_name") <> "") Then
rsb__mmname = request.form("hr_name")
End If
%>
<%
Dim rsb__mmcode
rsb__mmcode = "%"
If (request.form("hr_code") <> "") Then
rsb__mmcode = request.form("hr_code")
End If
%>
<%
Dim rsb
Dim rsb_numRows
Set rsb = Server.CreateObject("ADODB.Recordset")
rsb.ActiveConnection = MM_conn_bargain_STRING
if ((rsb__mmname <> "%") or (rsb__mmcode <> "%")) then
rsb.Source = "SELECT * FROM t_hr ORDER BY hr_id DESC"
end if
rsb.CursorType = 0
rsb.CursorLocation = 2
rsb.LockType = 1
rsb.Open() 'Microsoft JET Database Engine (0x80040E0C)没有为命令对象设置命令。
rsb_numRows = 0
%>
rsb.open() 提示错误 没有为命令对象设置命令
这段代码是我从另外一个相似的搜索代码改的,那个没有问题,为什么这个就不行那,纳闷。。。

数据表名是b_hr 要查询的字段是 hr_name和hr_code