不能比较或排序 text、ntext 和 image 数据类型,除非使用 IS NULL 或 LIKE 运算符

Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]不能比较或排序 text、ntext 和 image 数据类型,除非使用 IS NULL 或 LIKE 运算符。

/11/login.asp,行 45

login.asp

<%
if request.querystring("action")="add" then
username=request.Form("textfield")
password=request.Form("textfield2")
username=replace(username,"'","’")
password=replace(password,"'","’")
sqlchk="select * from [admin] where admin='" & Username & "' and password='" & password & "'"
set rschk=conn.Execute (sqlchk) '==================这个是第45行
if rschk.eof and rschk.bof then
response.Redirect("login.asp?act=a")
else
session("25175guestbook")=username
response.Redirect("index.asp")
end if
%>

怎么解决呢....?

第1个回答  2007-12-27
你的admin和password字段类型不对吧,改称vchar或者nvchar