<%
var num = parseInt(Request.Form("T1"));
var casename = Request.Form("T2");
var caseurl = Request.Form("T3");
var flag = Request.Form("flag");
if(flag=""){
}
%>
……
<input type="hidden" name="flag" value="1">
……
<%else
if (num!=""){
sql = "Select * From case Where CaseNO="+num;
rs = Server.CreateObject("ADODB.Recordset");
rs = conn.Execute(sql);}//有错
else
if (casename!=""){
sql = "Select * From case Where CaseName='"+casename+"'";
rs = Server.CreateObject("ADODB.Recordset");
rs = conn.Execute(sql);}
else
if (caseurl!=""){
sql = "Select * From case Where CaseURL='"+caseurl+"'";
rs = Server.CreateObject("ADODB.Recordset");
rs = conn.Execute(sql);}
%>
<%
if(rs.eof){Response.Write("没有搜索到您需要的案例");}
else{
while(!rs.eof){
%>
<div align="center">
<center>
<table border="0" width="79%" height="64">
<tr>
<td width="100%" colspan="6" align="center" height="21"><b><font face="华文新魏" size="4">搜索结果显示</font></b></td>
</tr>
<tr>
<td width="17%" align="center" height="21"><font size="2"><b>案例时间</b></font></td>
<td width="15%" align="center" height="21"><font size="2"><b>案例编号</b></font></td>
<td width="32%" align="center" height="21"><font size="2"><b>案例名称</b></font></td>
<td width="30%" align="center" height="21"><font size="2"><b>案例URL</b></font></td>
<td width="8%" align="center" height="21"><b><font size="2">编辑</font></b></td>
<td width="8%" align="center" height="21"><b><font size="2">删除</font></b></td>
</tr>
<tr>
<td width="17%" align="center" height="8"><%=rs("CaseID")%></td>
<td width="15%" align="center" height="8"><%=rs("CaseNO")%></td>
<td width="32%" align="center" height="8"><%=rs("CaseName")%></td>
<td width="30%" align="center" height="8"><%=rs("CaseURL")%></td>
<td width="8%" align="center" height="8"><font size="2"><input type="submit" value="编辑" name="B1"></font></td>
<td width="8%" align="center" height="8"><font size="2"><input type="submit" value="删除" name="B2"></font></td>
</tr>
</table>
</center>
</div>
<%
rs.MoveNext();
}
}
rs.Close();
%>
</html>
这是个搜索,红色部分为出错行
出错信息为:
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是 1。
哪里错了???