Subject | Re: [IBO] Inserting a NULL value in a column |
---|---|
Author | Luiz |
Post date | 2002-09-08T22:04:29Z |
David,
----- Original Message -----
From: "David Husarik" <davidhusarik@...>
> I am using Delphi Professional 4.0 with update pack 3
> and IB Objects version 4.2Gc. In a parameterized
> stored procedure, how do I insert a null value into a
> field that can accept a null value. Would the folowing
> code chunk do the trick.
>
> if (locAddr = '') then
> begin
> parameterByName('LOC_ADDRESS').isNull;
> end
> else
> begin
> parameterByName('LOC_ADDRESS').asString := locAddr;
> end;
There isn't 'parameterByName' but 'ParamByName'.
You can use ParamByName('LOC_ADDRESS').Clear to set a null value.
Luiz