| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1624 人关注过本帖
标题:登录连接
只看楼主 加入收藏
百万英镑
Rank: 1
等 级:新手上路
帖 子:32
专家分:7
注 册:2011-9-14
结帖率:80%
收藏
 问题点数:0 回复次数:0 
登录连接

我建了一个成绩查询的页面,输入学号,选择所在学期,进行查询该学期的成绩,
这是我的代码;
           <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

请各位大侠帮助!!!!





搜索更多相关主题的帖子: 成绩查询 action border center 
2012-11-08 20:18
快速回复:登录连接
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011715 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved