不懂,既然是要更新为 null,跟图片大小就应该没关系
试试:
cc = getpict()
if empty(cc)
retu .f.
endif
cc = strconv(cc, 13)
if sqlexec(连接句柄, 'update fahuohead set fahuo_pic = ?cc from fahuohead where id = 4') > 0
sqlcommit(连接句柄)
if sqlexec(连接句柄, 'select fahuo_pic from fahuohead where id = 4', 'ttt') > 0
messagebox('图片已上传并下载成功, 数据长度:' + transform(len(strconv(fahuo_pic,14))))
endif
endif
messagebox('点确定,清空 id = 4 的图片命令')
cc = null
if sqlexec(连接句柄, 'update fahuohead set fahuo_pic = ?cc from fahuohead where id = 4') > 0
sqlcommit(连接句柄)
if sqlexec(连接句柄, 'select fahuo_pic from fahuohead where id = 4', 'ttt') > 0
messagebox('图片已清空, 数据长度:' + transform(iif(isnull(fahuo_pic),0,len(strconv(fahuo_pic,14)))))
endif
endif