Subject | RE: [IBO] NULL in TIB_Query.Params |
---|---|
Author | Helen Borrie |
Post date | 2001-01-09T12:25:42Z |
At 11:53 AM 09-01-01 +0100, you wrote:
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
_______________________________________________________
>I tried setting FieldByName('A').BlankIsNull := True; and alsoBLANKISNULL doesn't work like that. It's a ColumnAttribute.
>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.
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
_______________________________________________________