新微赢技术网

标题: [求助][Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是3 [打印本页]

作者: ♀鈊亂ゞ鎵伙    时间: 2010-1-14 07:42
标题: [求助][Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是3
这个是代码
<!--#include file="adovbs.inc"-->
<html>
<head>
<title>NEM PAGES</title>
<meta http-equiv="content-language" content="zh-us">
<meta http-equiv="content-type" content="text/html;charset="gb2312"">
</head>
<body text="#ffffff" link="#00004d" alink="#00004d" vlink="#00004d" bgcolor="#000000">
<%
set conn=server.createobject(adodb.connection)
conn.open proveider=mircrosoft.jet.oledb.4.0;data source= & server.mappath(book.mdb)
set rs=server.createobject("ADODB.recordset")
server.scripttimeout=200
dim lb,sm,cbs,jyr
lb=request.form("lb")
sm=request.form("sm")
cbs=request.form("cbs")
jyr=request.form("jyr")
s1="select xh,sm,lb,cbs,jf,jyr from book where("
if sm<>"" then
sl=s1&"sm="&""&sm&""
flag=1
end if
if lb<>"0" and flag=1 then
s1=s1&"and lb="&""&lb&""
flag=1
elseif lb<>"0" then
s1=s1&"lb="&""&lb&""
flag=1
end if
if cbs<>"1" and flag=1 then
s1=s1&"and cbs="&""&cbs&""
flag=1
elseif cbs<>"1" then
s1=s1&"cbs="&""&cbs&""
flag=1
end if
if jyr<>"2" and flag=1 then
s1=s1&"and jyr="&""&jyr&""
flag=1
elseif jyr<>"2" then
s1=s1&"jyr="&""&jyr&""
flag=1
end if
s1=s1&")"
if lb="0" and cbs="1" and jyr="2" then
s1="select xh,sm,lb,cbs,jf,jyr from book"
end if
rs.open s1,conn,3,1
if not rs.eof then
%>
<table>
<tr>
<td width="15">&nbsp;</td>
<td width="70%">
<table border="2" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="11%" align="center"><font color="#ff0000"><b>序号</b></font><td>
<td width="11%" align="center"><font color="#ff0000"><b>书名</b></font><td>
<td width="11%" align="center"><font color="#ff0000"><b>类别</b></font><td>
<td width="11%" align="center"><font color="#ff0000"><b>出版社</b></font><td>
<td width="11%" align="center"><font color="#ff0000"><b>借否</b></font><td>
<td width="11%" align="center"><font color="#ff0000"><b>借用人</b></font></td>
</tr>
<%do while not re.eof%>
<tr>
<%for i=0 to rs.fields.count-1%>
<td align="left"valign="middle" width="11%"><%rs(i).value%></td>
<%next%>
</tr>
<%rs.movenext
loop
set rs=nothing
%>
</table>
</td>
<td width="15%">&nbsp;</td>
</tr>
<tr>
<td width="10%">&nbsp;</td>
<td width="40">&nbsp;</td>
<td width="40%"><p align="center"><b><a href="chaxun.asp"><font face="楷书" size=5 color="#ff0000">返回</font></a></b></p> </td>
<td width="10%">&nbsp;</td>
</tr>
</table>
<% else %>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="24%">&nbsp;</td>
<td width="50%">
<p align="center">&nbsp;</p>
<p align="center"><font size=5 face=华文行揩 color="#ff0000">对不起!您查找的资料不存在.</font></p>
<p align="center"><b><a href="chaxun.asp"><font size=5 face=楷体 color="#ff0000"></font></a></b></p>
</td>
<td width="26%">&nbsp;</td>
</tr>
</table>
<% end if %>
<% set conn=nothing %>
</body>
</html>
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是 3。
/chaxunresult.asp, 第 50 行




欢迎光临 新微赢技术网 (http://bbs.weiying.cn/) Powered by Discuz! X3.2