Subject | Re: [IBO] Field value |
---|---|
Author | Markus Ostenried |
Post date | 2003-10-16T21:58:03Z |
At 11:21 Thursday, 16.10.2003 +0000, you wrote:
I'm not quite sure if I understand your problem:
If table2.field1 IS NULL then you want the contents of table1.field1 to be
NULL, too, right ?
The properties "AsString", "Text", "AsVariant" and "AsValue" don't contain
the information that your source field is empty. They contain only
something like an empty string which is in fact a value - but NULL is a state.
IMO you have to check this yourself with something like
if Table1.FieldByName('FIELDNAME').IsNull then
Table1.FieldByName('FIELDNAME').Clear
else
Table1.FieldByName('FIELDNAME').Text :=
Table2.FieldByName('FIELDNAME').Text;
HTH,
Markus
>I am using classes of IBODataset, not exactly ttableHi,
>My problem is i have thousands of lines with this sintaxe
>table1.field1.text = table2.field1.text
>and i am converting these codes from paradox to interbase and i not
>want change all lines in my software.
>Thanks for your attention.
I'm not quite sure if I understand your problem:
If table2.field1 IS NULL then you want the contents of table1.field1 to be
NULL, too, right ?
The properties "AsString", "Text", "AsVariant" and "AsValue" don't contain
the information that your source field is empty. They contain only
something like an empty string which is in fact a value - but NULL is a state.
IMO you have to check this yourself with something like
if Table1.FieldByName('FIELDNAME').IsNull then
Table1.FieldByName('FIELDNAME').Clear
else
Table1.FieldByName('FIELDNAME').Text :=
Table2.FieldByName('FIELDNAME').Text;
HTH,
Markus