本来无一物,何处惹尘埃
It is empty at all here, Why pm 2.5 is so TMD high!
不过还是有点问题,麻烦楼上兄弟帮个忙,我按照要求写的程序:
搜索页:
<table width="362" height="31" border="0" cellpadding="0" cellspacing="1">
<form action="zhao.asp" method="get" name="form1" id="form1">
<tr>
<td width="359">搜索
<select name="sea" id="sea">
<option value="Gnum">用户编号</option>
<option value="Gname">用户名称</option>
</select>
<input name="Keyword" type="text" id="Keyword" />
<input type="submit" name="Submit" value="提交" /></td>
</tr>
</form>
</table>
参数传递页面:zhao.asp
<!--#include file="Connections/Conn.asp" -->
<%
Dim Recordset1__Keyword
Recordset1__Keyword = "%"
If (Request("Keyword") <> "") Then
Recordset1__Keyword = Request("Keyword")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
dim sea
sea =request("sea")
Select Case sea
Case "Gnum"
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_Conn_STRING
Recordset1.Source = "SELECT * FROM admin where Gnum like '%" + Replace(Recordset1__Keyword, "'", "''") + "%' ORDER BY Gnum DESC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
Case "Gname"
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_Conn_STRING
Recordset1.Source = "SELECT * FROM admin where Gnum like '%" + Replace(Recordset1__Keyword, "'", "''") + "%' ORDER BY Gnum DESC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
end select
%>
可是提交的时候为什么总会出现乱七八糟的错误,要么就是缺少对象,要么就是记录集为真假问题,请帮忙看一下我的参数传递是否正确!
谢谢