| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1068 人关注过本帖
标题:大家帮忙看下这是什么意思呀??
只看楼主 加入收藏
peiyanjian
Rank: 1
等 级:新手上路
帖 子:96
专家分:0
注 册:2008-2-29
收藏
 问题点数:0 回复次数:6 
大家帮忙看下这是什么意思呀??
Microslf OLE DB proride for ODBC Drivers 错误 '80040e07'
[Microslf][ODBC Microslf access Drivers] 标准表达式中数据类型不匹配.
/ado/2003/stu_xx.asp ,行8


<%
set conn=server.createobject("adodb.connection")
DSNtemp = "Driver={Microsoft Access Driver (*.mdb)};"
DSNtemp = DSNtemp & "DBQ=" & server.mappath("student.mdb")
conn.open DSNtemp
xuehao = request.querystring("id")
 //这里有id是上个总表中的(<TD><div align="center"><a href='stu_xx.asp?id= <%= rs("学号") %

>'><%= rs("学号") %></a></div></TD>)

stext = "select * from 06151 where 学号='" & xuehao & "'"
set rs = conn.execute(stext)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>个人情况</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>&nbsp;</p>
<div align="center">
  <table width="800" border="1" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
    <!--DWLayoutTable-->
    <tr>
      <td width="800" height="101" valign="top"><div align="center"><strong><font

color="#000000" size="7" face="方正舒体, 方正姚体, ">个人详细情况登记表

</font></strong></div></td>
    </tr>
    <tr>
      <td height="299" valign="top"><table width="100%" border="0" cellpadding="0"

cellspacing="0">
          <!--DWLayoutTable-->
          <tr>
            <td width="441" height="299" valign="top"><table width="100%" border="1"

cellpadding="0" cellspacing="0">
                <!--DWLayoutTable-->
                  <td height="25" valign="top"><div align="center">姓&nbsp;&nbsp;
                      &nbsp;名</div></td>
                  <td valign="top" ><% response.write(rs("姓名")) %></td>
                  <td valign="top" ><div align="center">职务</div></td>
                  <td colspan="3" valign="top" ><div align="center"><% response.write(rs("

职务")) %></div></td>
                </tr>
                <tr>
                  <td height="25" valign="top"> <div align="center">出生年月</div></td>
                  <td valign="top" ><% response.write(rs("出生年月")) %></td>
                  <td valign="top" ><div align="center">入学年月 </div></td>
                  <td valign="top" ><div align="center"><% response.write(rs("入学年月"))

%></div></td>
                  <td valign="top" ><div align="center">政治面貌 </div></td>
                  <td valign="top" ><div align="center"><% response.write(rs("政治面貌"))

%></div></td>
                <tr>
                  <td height="25" valign="top"><div align="center">民&nbsp;&nbsp;&nbsp;
                      族</div></td>
                  <td valign="top" ><% response.write(rs("民族")) %></td>
                  <td valign="top" ><div align="center">入学地区 </div></td>
                  <td valign="top" ><div align="center"><% response.write(rs("入学地区"))

%></div></td>
                  <td valign="top" ><div align="center">党团时间 </div></td>
                  <td valign="top" ><div align="center"><% response.write(rs("党团时间"))

%></div></td>
                <tr>
                  <td height="25" valign="top"><div align="center">有何特长</div></td>
                  <td valign="top" ><% response.write(rs("有何特长")) %></td>
                  <td valign="top" ><div align="center">籍&nbsp;&nbsp; &nbsp;贯
                    </div></td>
                  <td valign="top" ><div align="center"><% response.write(rs("籍贯")) %

></div></td>
                  <td valign="top" ><div align="center">邮政编码 </div></td>
                  <td valign="top" ><div align="center"><% response.write(rs("邮政编码"))

%></div></td>
                <tr>
                  <td height="25" valign="top"><div align="center">班&nbsp;&nbsp;
                      &nbsp;级</div></td>
                  <td valign="top" ><% response.write(rs("班级")) %></td>
                  <td valign="top" ><div align="center">学&nbsp;&nbsp; &nbsp;号
                    </div></td>
                  <td valign="top" ><div align="center"><% response.write(rs("学号")) %

></div></td>
                  <td valign="top" ><div align="center">联系电话 </div></td>
                  <td valign="top" ><div align="center"><% response.write(rs("联系电话"))

%></div></td>
                <tr>
                  <td height="33" valign="top">
<div align="center">家庭住址</div></td>
                  <td colspan="5" valign="top" ><div align="center"><% response.write(rs("

家庭住址")) %></div></td>
                <tr>
                  <td height="32" valign="top"><div align="center">学习情况</div></td>
                  <td colspan="5" valign="top" ><div align="center"><% response.write(rs("

学习情况")) %></div></td>
                <tr>
                  <td height="32" valign="top"><div align="center">个人奖励</div></td>
                  <td colspan="5" valign="top" ><div align="center"><% response.write(rs("

个人奖励")) %></div></td>
                <tr>
                  <td height="32" valign="top"><div align="center">违纪情况</div></td>
                  <td colspan="5" valign="top" ><div align="center"><% response.write(rs("

违纪情况")) %></div></td>
                <tr>
                  <td height="32" valign="top"><div align="center">个人评定</div></td>
                  <td colspan="5" valign="top" ><div align="center"><% response.write(rs("

个人评定")) %></div></td>
                <tr>
                  <td height="32" valign="top"><div align="center">班主任评定</div></td>
                  <td colspan="5" valign="top" ><div align="center"><% response.write(rs("

班主任评定")) %></div></td>
              </table></td>
            <td width="359" valign="top"><img name="" src="" width="359" height="324"

alt="" style="background-color: #00CCCC"></td>
          </tr>
        </table></td>
    </tr>
  </table>
</div>
</body>
</html>
搜索更多相关主题的帖子: Microsoft DSNtemp stu 意思 
2008-03-10 21:20
madpbpl
Rank: 4
等 级:贵宾
威 望:11
帖 子:2876
专家分:244
注 册:2007-4-5
收藏
得分:0 
stext = "select * from [06151] where 学号='" & xuehao & "'"
2008-03-10 22:18
lifongmaples
Rank: 1
等 级:新手上路
帖 子:81
专家分:0
注 册:2006-8-27
收藏
得分:0 
stext = "select * from 06151 where 学号='" & xuehao & "'"
ID号查询时不必用单引号.直接在双引号后面加上ID变量就可.如下:
stext = "select * from 06151 where 学号="&xuehao
2008-03-10 23:33
peiyanjian
Rank: 1
等 级:新手上路
帖 子:96
专家分:0
注 册:2008-2-29
收藏
得分:0 
3楼的,按你的做法.提示这样的.

Microslf OLE DB proride for ODBC Drivers 错误 '80040e07'
[Microslf][ODBC Microslf access Drivers] 语法错误(操作符丢失)在查询表达式'学号='中/ado/2003/stu_xx.asp ,行8
2008-03-11 13:08
peiyanjian
Rank: 1
等 级:新手上路
帖 子:96
专家分:0
注 册:2008-2-29
收藏
得分:0 
[bo]以下是引用 [un]madpbpl[/un] 在 2008-3-10 22:18 的发言:[/bo]

stext = "select * from [06151] where 学号='" & xuehao & "'"



你这样做,还是那样的错误...
2008-03-11 13:09
madpbpl
Rank: 4
等 级:贵宾
威 望:11
帖 子:2876
专家分:244
注 册:2007-4-5
收藏
得分:0 
学号的类型是什么?建议不要用中文命名字段,用英文来命名,如果是mssql数据库可以排除,你的错误应该是xuehao = request.querystring("id")这个值没有传过来的原因。
如果学号是数字类型,需要把sql语句写成stext = "select * from [06151] where 学号="& xuehao
2008-03-11 14:16
peiyanjian
Rank: 1
等 级:新手上路
帖 子:96
专家分:0
注 册:2008-2-29
收藏
得分:0 
谢谢,解决了.
2008-03-11 19:12
快速回复:大家帮忙看下这是什么意思呀??
数据加载中...
 
   



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

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