asp中怎么判断数据库中image字段为空?

kingluan 2003-08-21 02:45:05
??在线求助~~
...全文
41 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
onlysgirl 2003-08-21
  • 打赏
  • 举报
回复
where img is not null
ttt2 2003-08-21
  • 打赏
  • 举报
回复
lenb()
kingluan 2003-08-21
  • 打赏
  • 举报
回复
if lenb(recordset1("pic1"))& ""=""
这样就可以了,谢谢各位~~
ceocio 2003-08-21
  • 打赏
  • 举报
回复
select * from tablename where iamge is not null
ceocio 2003-08-21
  • 打赏
  • 举报
回复
select * from tablename where iamge is not null
lang11zi 2003-08-21
  • 打赏
  • 举报
回复
if rec("image")="" then .....
end if
vivisogood 2003-08-21
  • 打赏
  • 举报
回复
if len(rs("name"))<"1" then
response.write("空")
end if

sql 可以 用 is null和 is not null
mjwgtm 2003-08-21
  • 打赏
  • 举报
回复
字段类型是OLE就不能这样判断,要在数据库中我加一个字段来存真假值。
如果上传了图片就为1,空为0。在取图片时就判断这个值
kingluan 2003-08-21
  • 打赏
  • 举报
回复
不行,会报错,数据类型不匹配
我试过 rec("image") & "" = "" ,还是报错,郁闷~~
xiaofei7569 2003-08-21
  • 打赏
  • 举报
回复
if rec("image")&"A"="A" then
.....
end if

or
if isempty(rec("image")) then
.....
end if
杨小杨 2003-08-21
  • 打赏
  • 举报
回复
isnull(rs("img"))

或者rs("img")=null
diya 2003-08-21
  • 打赏
  • 举报
回复
if rec("image")="" then .....
end if

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧