标题:[求助]无效的 null 使用
取消只看楼主
hulin862008
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2006-9-23
 问题点数:0 回复次数:0 
[求助]无效的 null 使用

Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
[Microsoft][ODBC Microsoft Access Driver] 无效的 null 使用
/dn/gqxx.asp, 第 40 行
出错行代码是:
sql2="select * from gqxxly where cint(gqxxid)="&id&" order by lysj desc"
rs2.open sql2,conn,1,3


gqxx.asp代码如下:
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style>
<title>供求信息详细资料!</title>
<script language="javascript">
function check(){
if(form1.user.value==""){
alert("请填写留言者姓名!")
form1.user.focus();
return false;
}else if(form1.user.value.length>10 || form1.user.value.length<3){
alert("留言者姓名宽度不得大于10或3小于!")
form1.user.focus();
return false;
}else if(form1.content.value==""){
alert("留言不能为空!")
form1.content.focus();
return false;
}else if(form1.content.value.length>300 || form1.content.value.length<10){
alert("留言内容应该在10-300之间!")
form1.content.focus();
return false;
}
}
</script>
<!--#include file="conn.asp"-->
<!--#include file="get.asp"-->
<!--#include file="index_top.asp"-->
<%
id=request.QueryString("id")
set rs=server.CreateObject("adodb.recordset")
sql="select * from gqxx where id="&id&""
set rs2=server.CreateObject("adodb.recordset")
sql2="select * from gqxxly where cint(gqxxid)="&id&" order by lysj desc"
rs.open sql,conn,1,3
rs2.open sql2,conn,1,3 '就是说的这行出错,有谁能告诉我呀!急呀!
%>
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="200">&nbsp;</td>
<td><table width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td width="29%" align="center">类&nbsp;&nbsp;&nbsp;&nbsp;型:</td>
<td width="71%"><%=rs("type")%></td>
</tr>
<tr>
<td align="center">标&nbsp;&nbsp;&nbsp;&nbsp;题:</td>
<td><%=rs("title")%></td>
</tr>
<tr>
<td align="center">详细信息:</td>
<td><%=rs("content")%></td>
</tr>
<tr>
<td align="center">发&nbsp;布&nbsp;者:</td>
<td><%=rs("user")%></td>
</tr>
<tr>
<td align="center">发布时间:</td>
<td><%=rs("sj")%></td>
</tr>
<tr>
<td align="center">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="center" valign="middle"><%if rs2.eof then%><font color="#FF0000"><h3>当前暂无留言!</h3></font><%else%><table width="90%" border="0" cellspacing="1" cellpadding="5">
<%

for i=1 to rs2.pagesize%>
<tr>
<td width="15%" align="center">留言时间:</td>
<td width="35%"><%=rs2("lysj")%></td>
<td width="15%" align="center">留言者IP:</td>
<td width="35%"><%=rs2("ip")%></td>
</tr>
<tr>
<td align="center">留 言 者:</td>
<td colspan="3"><%=rs2("user")%></td>
</tr>
<tr>
<td align="center">留言内容:</td>
<td colspan="3"><font color=#FF0000><%=rs2("content")%></font></td>
</tr>
<tr>
<td colspan="4">&nbsp;</td>
</tr>
<%
rs2.movenext
if rs2.eof then
exit for
end if
next%>
<tr>
<td colspan="4">共有<font color=#FF0000><%=rs2.recordcount%></font>条留言&nbsp;&nbsp;当前第<font color=#FF0000><%=p%></font>页/共<font color=#FF0000><%=rs2.pagecount%></font>页&nbsp;&nbsp;&nbsp;&nbsp;<a href=gqxx.asp?id=<%=id%>&page=1 class="a1">首页</a>&nbsp;&nbsp;<a href=gqxx.asp?id=<%=id%>&page=<%=p-1%> class="a1">上一页</a>&nbsp;&nbsp;<a href=gqxx.asp?id=<%=id%>&page=<%=p+1%> class="a1">下一页</a>&nbsp;&nbsp;<a href=gqxx.asp?id=<%=id%>&page=<%=rs2.pagecount%> class="a1">末页</a></td>
</tr>
</table>
<%end if%></td>
</tr>
<tr>
<td colspan="2" align="center">
<table width="90%" border="1" align="center" cellpadding="5" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td><font color="#FF0000">&gt; 供求信息留言</font></td>
</tr>
<tr>
<td align="center"><form name="form1" method="post" action="gqxxly1.asp" onSubmit="return check()">
<table width="50%" border="1" cellpadding="5" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td align="center">留 言 者:</td>
<td>jfjf</td>
</tr>
<tr>
<td align="center">留言内容:</td>
<td><textarea name="content" cols="30" rows="8" id="content"></textarea>
<font color="#FF0000"> *300字以内</font></td>
</tr>

<tr>
<td colspan="2" align="center">
<input type="submit" name="Submit" value="提交留言">
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset" name="Submit2" value="重填"></td>
</tr>
</table>
</form></td>
</tr>
</table> </td>
</tr>
</table></td>
</tr>
</table>
<!--#include file="copyright.asp"-->

搜索更多相关主题的帖子: null 
2006-09-27 10:45



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-93223-1-1.html




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

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