求高手帮忙,急急急!!
错误类型:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
不能比较或排序 text、ntext 和 image 数据类型,除非使用 IS NULL 或 LIKE 运算符。
/root/ASP SQL Server源代码/8/bbs/addsave.asp, 第 13 行
源代码:
<%@ Language=VBScript %>
<%
if session("admin")="" then
response.redirect "../admin.asp"
end if
%>
<!--#include file="conn.asp"-->
<%
ly=LCase(Request("ly"))
lytitle=LCase(Request("lytitle"))
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open "Select * from bbs where ly ='"&ly&"'",conn
if not rs.EOF then
Response.Write "<font color=red><div align=center><br><br>该留言内容已经存在!</div></font>"
Response.End
end if
rs.close
sql="select * from bbs"
rs.open sql,conn,1,3
rs.addnew
rs("lytitle")=lytitle
rs("ly")=ly
rs("classid") = request.form("psubject")
rs("lyren") = request.form("psubject1")
rs("hhr") = request.form("psubject1")
rs.update
rs.Close
set rs=Nothing
conn.Close
set conn=Nothing
%>
<html>
<head>
<meta http-equiv="refresh" content='2; URL=bbsview.asp?id=<%=request("psubject")%>&part=<%=request("psubject2")%>'>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../conn/style.css" rel="stylesheet" type="text/css">
<br>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align=center>
<tr bgcolor="#efefef">
<td colspan=2 height="25" background="../pic/bbsbg.gif" align=center><strong><font color="#FFFFFF">添加贴子成功</font></strong></td>
</tr>
</td>
</tr>
</table>
<table border="1" cellspacing="0" width="90%" bordercolorlight="#004080" bordercolordark="#FFFFFF" cellpadding="0" align="center" bgcolor="#CAE4FF">
<tr bgcolor="#efefef">
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align=center>
<tr bgcolor="#efefef">
<td width=18% height="76"></td>
<td width=82%>
<br>添加贴子成功,您可以选择以下操作:
<br><br><li><a href=index.asp>论坛首页</a></li>
<br><li><a href="bbsview.asp?id=<%=request("psubject")%>&part=<%=request("psubject2")%>">『<%=request("psubject2")%>』</a></li><br><br>
</td>
</tr>
</table>
</td>
</tr>
</table>
我按照网上一些 高手的修改方法,把rs.Open "Select * from bbs where ly ='"&ly&"%'",conn
改为rs.Open "Select * from bbs where ly like'%"&ly&"%'",conn还是错误的
错误类型:
Microsoft OLE DB Provider for SQL Server (0x80040E21)
多步 OLE DB 操作产生错误。如果可能,请检查每个 OLE DB 状态值。没有工作被完成。
/root/ASP SQL Server源代码/8/bbs/addsave.asp, 第 29 行