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"> </td>
<td><table width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#CCCCCC">
<tr>
<td width="29%" align="center">类 型:</td>
<td width="71%"><%=rs("type")%></td>
</tr>
<tr>
<td align="center">标 题:</td>
<td><%=rs("title")%></td>
</tr>
<tr>
<td align="center">详细信息:</td>
<td><%=rs("content")%></td>
</tr>
<tr>
<td align="center">发 布 者:</td>
<td><%=rs("user")%></td>
</tr>
<tr>
<td align="center">发布时间:</td>
<td><%=rs("sj")%></td>
</tr>
<tr>
<td align="center"> </td>
<td> </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"> </td>
</tr>
<%
rs2.movenext
if rs2.eof then
exit for
end if
next%>
<tr>
<td colspan="4">共有<font color=#FF0000><%=rs2.recordcount%></font>条留言 当前第<font color=#FF0000><%=p%></font>页/共<font color=#FF0000><%=rs2.pagecount%></font>页 <a href=gqxx.asp?id=<%=id%>&page=1 class="a1">首页</a> <a href=gqxx.asp?id=<%=id%>&page=<%=p-1%> class="a1">上一页</a> <a href=gqxx.asp?id=<%=id%>&page=<%=p+1%> class="a1">下一页</a> <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">> 供求信息留言</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="提交留言">
<input type="reset" name="Submit2" value="重填"></td>
</tr>
</table>
</form></td>
</tr>
</table> </td>
</tr>
</table></td>
</tr>
</table>
<!--#include file="copyright.asp"-->