Subject RE: [IBO] NULL in TIB_Query.Params
Author Helen Borrie
At 11:53 AM 09-01-01 +0100, you wrote:

>I tried setting FieldByName('A').BlankIsNull := True; and also
>ParamByName('A').BlankIsNull := True;
>with the same results. The only way around I can see so far is to
>reconstruct the SQL.Text property to use IS NULL explicitly instead of
>parameters.


BLANKISNULL doesn't work like that. It's a ColumnAttribute.

Don't touch the SQL.Text property and don't go to such lengths as to build
an SQL string..

Instead of a parameterized query, just use the statement without a WHERE
clause.

Then in your OnPrepareSQL Event, add SQLWhereItems entries, e.g.


SQLWhereItems.Add( 'A IS NULL);
SQLWhereItems.Add( 'AND' );
SQLWhereItems.Add( 'B = 'Rumpelstiltskin' );


There's usually more than one answer to these problems. :))

TSh.



All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________