数据库(access)的字段是文本类型给定的值value类型是olevariant类型如果value是个空值,如何判断它为空?我写了这样的程序,都不行 if value = '' then .....
if trim(value)='' then.....
if pos('x',value) = 0 then.....
if value = nil then..... //编译不了
if value = null then...
if value = 0 then......以上代码就错了一个,余下的编译执行没有问题,只是不执行then后的语句到底如何判定它是空的?
if trim(value)='' then.....
if pos('x',value) = 0 then.....
if value = nil then..... //编译不了
if value = null then...
if value = 0 then......以上代码就错了一个,余下的编译执行没有问题,只是不执行then后的语句到底如何判定它是空的?
delphi中有一个涵数VarIsNull