Not necessarily Null, the field may contain an empty string,
If the Query you are calling requires an blank string but the field you are assigning to it is null then mopdifying RickJ's code a bit try
if ClientQuery.FieldByName( 'CL_ADDR2' ).IsNull then
Parameters.ParamByName( 'Addr2' ).Value := ''
else
Parameters.ParamByName( 'Addr2' ).Value := ClientQuery.FieldByName( 'CL_ADDR2' ).AsString;
it depends on what ClientQuery is feeding and what the other query is requiring
regards
Main Topics
Browse All Topics





by: RickJPosted on 2005-12-07 at 16:10:51ID: 15441193
What about this..
if ClientQuery.FieldByName( 'CL_ADDR2' ).AsString = '' then
Parameters.ParamByName( 'Addr2' ).Value := Null
else
Parameters.ParamByName( 'Addr2' ).Value := ClientQuery.FieldByName( 'CL_ADDR2' ).AsString;
I have not tested but I think it should work.