Sign-up....

SQL字段为Null的问题

表1中jjhy字段为Null,如果查询时输入某个字符,select应该显示无记录才对,可是却显示出了莫明的数据,这是为什么啊?

[65 byte] By [msdn] at [2007-8-15 10:02:42]
# 1 Re: SQL字段为Null的问题

把你的代码贴出来看看。

binger819623 at 2006-4-4 16:14:27 >
# 2 Re: SQL字段为Null的问题

<% if rs("jjhy")<>" then %>

<td><div align="center"><%= rs("jjhy")%></div></td>

<% else %>

<td><div align="center"><%Response.Write("无记录") %></div></td>

<% end if %>

试试

sy_binbin at 2006-4-4 16:24:17 >
# 3 Re: SQL字段为Null的问题

if jjhy<>" then

sql=sql&" and isnull(jjhy,'') like '%"&jjhy&"%'"

end if

baby97 at 2006-4-4 16:33:10 >

Web

All Classified