
Microsoft JET Database Engine 至少一个参数没有被指定值 ;编译后说Rs.Open sql,conn,1,1这行有错~~
<%@LANGUAGE="VBSCRIPT"CODEPAGE="936"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transiti...
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>查询结果</title>
<link rel="stylesheet" type="text/css" href="css.css">
<style type="text/css">
<!--
.STYLE1 {color: #00FF00}
-->
</style>
</head>
<body>
<a href="chaxun.asp">返回
</a><br />
<br />
<%
Dim Search_Content
Dim temp
Dim sql
Dim Rs
Dim connstr
Set Rs = Server.CreateObject("ADODB.Recordset")
set conn=Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/sjk.mdb")
conn.Open connstr
Search_Content=Request.QueryString("Search_Content")
sql="select * from sjk where pingming like '%"&Search_Content&"%' "
Rs.Open sql,conn,1,1
%>
<table width="100%" border="1" bordercolor="#C1F2FD" cellspacing="3" cellpadding="3">
<tr>
<td ><font color=blue编号</font></td>
<td><font color="blue">品名</font></td>
<td ><font color=blue>数量</font> </td>
<td><font color=blue>日期</font></td>
<td ><font color=blue>经手人</font></td>
</tr>
<%
While (Not Rs.EOF)
%>
<tr >
<td><%
temp=Rs.Fields.Item("bianhao").Value
temp=Replace(temp,Search_Content,"<font color=red>"&Search_Content&"</font>")
Response.Write(temp)
%> </td>
<td>
<%
temp=Rs.Fields.Item("pinming").Value
temp=Replace(temp,Search_Content,"<font color=red>"&Search_Content&"</font>")
Response.Write(temp)
%> </td>
<td >
<%temp=Rs.Fields.Item("shuliang").Value
temp=Replace(temp,Search_Content,"<font color=red>"&Search_Content&"</font>")
Response.Write(temp)
%></td>
<td align="center"><%
temp=Rs.Fields.Item("riqi").Value
temp=Replace(temp,Search_Content,"<font color=red>"&Search_Content&"</font>")
Response.Write(temp)
%></td>
<td ><%temp=Rs.Fields.Item("jingshouren").Value
temp=Replace(temp,Search_Content,"<font color=red>"&Search_Content&"</font>")
Response.Write(temp)
%></td>
</tr>
<%
Rs.MoveNext
Wend
Rs.Close()
%>
</table>
<p> </p>
</body>
</html> 展开
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>查询结果</title>
<link rel="stylesheet" type="text/css" href="css.css">
<style type="text/css">
<!--
.STYLE1 {color: #00FF00}
-->
</style>
</head>
<body>
<a href="chaxun.asp">返回
</a><br />
<br />
<%
Dim Search_Content
Dim temp
Dim sql
Dim Rs
Dim connstr
Set Rs = Server.CreateObject("ADODB.Recordset")
set conn=Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/sjk.mdb")
conn.Open connstr
Search_Content=Request.QueryString("Search_Content")
sql="select * from sjk where pingming like '%"&Search_Content&"%' "
Rs.Open sql,conn,1,1
%>
<table width="100%" border="1" bordercolor="#C1F2FD" cellspacing="3" cellpadding="3">
<tr>
<td ><font color=blue编号</font></td>
<td><font color="blue">品名</font></td>
<td ><font color=blue>数量</font> </td>
<td><font color=blue>日期</font></td>
<td ><font color=blue>经手人</font></td>
</tr>
<%
While (Not Rs.EOF)
%>
<tr >
<td><%
temp=Rs.Fields.Item("bianhao").Value
temp=Replace(temp,Search_Content,"<font color=red>"&Search_Content&"</font>")
Response.Write(temp)
%> </td>
<td>
<%
temp=Rs.Fields.Item("pinming").Value
temp=Replace(temp,Search_Content,"<font color=red>"&Search_Content&"</font>")
Response.Write(temp)
%> </td>
<td >
<%temp=Rs.Fields.Item("shuliang").Value
temp=Replace(temp,Search_Content,"<font color=red>"&Search_Content&"</font>")
Response.Write(temp)
%></td>
<td align="center"><%
temp=Rs.Fields.Item("riqi").Value
temp=Replace(temp,Search_Content,"<font color=red>"&Search_Content&"</font>")
Response.Write(temp)
%></td>
<td ><%temp=Rs.Fields.Item("jingshouren").Value
temp=Replace(temp,Search_Content,"<font color=red>"&Search_Content&"</font>")
Response.Write(temp)
%></td>
</tr>
<%
Rs.MoveNext
Wend
Rs.Close()
%>
</table>
<p> </p>
</body>
</html> 展开
若以下回答无法解决问题,邀请你更新回答
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询