Board index » delphi » TMemoField.Clear doesn't set field to NULL

TMemoField.Clear doesn't set field to NULL

Hello,

I have a table with a Memo-field in it (blob sub_type 1),
the field is not required.
Lets say "FieldName : TMemoField" is the corresponding
persistent field (Dataset is TIBDataset).
When calling FieldName.Clear, the field is not set to NULL.
FieldName.AsString is empty, but if I call FieldName.IsNull, I get
FALSE.

Using the BDE, FieldName.Clear sets the Field to NULL.

Why is TIBCustomDataSet not setting the field to NULL
and how can I set it to NULL?

I use IB 6.01, IBX 4.52.

Thanks,
Klaus

 

Re:TMemoField.Clear doesn't set field to NULL


IBX always stores 0 length blob fields as NULL.  IBX is indirectly setting the
Field to NULL when it sets the string to ''.  I'll see about getting the IsNull
to also return true in this case though.

Quote
Klaus Musch wrote:

> Hello,

> I have a table with a Memo-field in it (blob sub_type 1),
> the field is not required.
> Lets say "FieldName : TMemoField" is the corresponding
> persistent field (Dataset is TIBDataset).
> When calling FieldName.Clear, the field is not set to NULL.
> FieldName.AsString is empty, but if I call FieldName.IsNull, I get
> FALSE.

> Using the BDE, FieldName.Clear sets the Field to NULL.

> Why is TIBCustomDataSet not setting the field to NULL
> and how can I set it to NULL?

> I use IB 6.01, IBX 4.52.

> Thanks,
> Klaus

--
Jeff Overcash (TeamB)   I don't think there are any Russians
(Please do not email    And there ain't no Yanks
 me directly unless     Just corporate criminals
 asked.  Thank You)     Playing with tanks.  (Michael Been)

Other Threads