50分求教:空字符查询问题~~
sql.add('select * from record where location like :temp1 and build like :temp2 and room like :temp3');
parambyname('temp1').asstring:='%'+trim(locaEdit.Text)+'%';
parambyname('temp2').asstring:='%'+trim(buildEdit.Text)+'%';
parambyname('temp3').asstring:='%'+trim(roomEdit.Text)+'%';
如果3个Edit均不输内容,期望查询到的是全库内容,但结果是只有location/build/room三个字段都有值的才能查询到。若3者之中有一个为空(NULL)则不行。
问题:DELPHI中的'%'+trim(roomEdit.Text)+'%',当edit.text=''时不能获取SQL SERVER中的NULL值?