Subject | NULL in TIB_Query.Params |
---|---|
Author | Ondrej Kelle |
Post date | 2001-01-09T08:51:45Z |
Hi all,
my question today is how to specify NULL in TIB_Query.Params? I tried
calling Params[xx].Clear, Params.ClearBuffers(rsNone), assigning Null or
Unassigned to Params[xx].Value but none of these works. Please consider the
following test case:
CREATE TABLE TEST (
A INTEGER,
B INTEGER
);
the test table contains the following data:
A B
============ ============
<null> 1
<null> 2
1 1
1 2
2 1
2 2
I would like to use TIB_Query with a parameter. SQL.Text property contains
statement 'SELECT * FROM TEST WHERE (A = :A)'.
with IB_Query1 do
begin
Close;
if not Prepared then
Prepare;
Params[0].Clear;
// Params.ClearBuffers(rsNone);
// Params[0].Value := Null;
// Params[0].Value := Unassigned;
Open;
// here I always get Eof
end;
Thanks in advance for your help
TOndrej
my question today is how to specify NULL in TIB_Query.Params? I tried
calling Params[xx].Clear, Params.ClearBuffers(rsNone), assigning Null or
Unassigned to Params[xx].Value but none of these works. Please consider the
following test case:
CREATE TABLE TEST (
A INTEGER,
B INTEGER
);
the test table contains the following data:
A B
============ ============
<null> 1
<null> 2
1 1
1 2
2 1
2 2
I would like to use TIB_Query with a parameter. SQL.Text property contains
statement 'SELECT * FROM TEST WHERE (A = :A)'.
with IB_Query1 do
begin
Close;
if not Prepared then
Prepare;
Params[0].Clear;
// Params.ClearBuffers(rsNone);
// Params[0].Value := Null;
// Params[0].Value := Unassigned;
Open;
// here I always get Eof
end;
Thanks in advance for your help
TOndrej