登录连接
我建了一个成绩查询的页面,输入学号,选择所在学期,进行查询该学期的成绩,
这是我的代码;
<body>
<form method="POST" action="">
<table border="1" width="100%" cellspacing="0" cellpadding="5" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr>
<td width="13%" align="center">请输入学号</td>
<td width="14%" align="center"><input type="text" name="sname" size="15"></td>
<td width="14%" align="center">请选择学期</td>
<td width="19%" align="center">
<select size="1" name="xueqi">
<option >第一学期</option>
<option >第二学期</option>
<option >第三学期</option>
<option >第四学期</option>
<option >第五学期</option>
<option >第六学期</option>
</select>
</td>
<td width="40%" align="center"><div align="left">
<input type="submit" value="查询" name="B1" />
</div></td>
</tr>
</table>
</form>
<!--#include file="conn.asp"-->
<%
dim usernm,xueqi
usernm=trim(request("sname"))
xueqi=trim(request("xueqi"))
if usernm="" then
response.write "输入不能为空"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from serch where s_nm='"&usernm&"' and xueqi='"&xueqi&"'"
rs.open sql,conn,1,1
%>
<table width="768" border="0" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr>
<td width="388" height="25" colspan="6" align="center">
<p align="left">查询结果</p>
</td>
</tr>
<td height="25"><center>
<tr><td width="108" height="25" align="center">科目</td>
<td width="46" height="25" align="center">成绩</td>
</tr>
<%if not rs.eof then%>
<%do while not rs.eof%>
<tr>
<td width="108" height="25" align="center"><%=rs("xueqi")%></td>
<td width="46" height="25" align="center"><%=rs("sxore")%></td>
</tr>
<%rs.movenext%>
<%loop%>
<%else%>
<tr>
<td width="388" height="25" colspan="6" align="center">查无此记录</td>
</tr>
<%end if%>
</table>
</body>运行时总显示
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
ODBC 驱动程序不支持所需的属性。有时显示参数冲突,定位到rs.open sql,conn,1,1
请各位大侠帮助!!!!