Null Values from DB
Hi,
in some cases I have a NULL value inside a database value. This is a valid
value and I will display it in the report as blank (''). But I got 0 if the
value in the db is NULL. 0 and NULL are not the same. Is there a way to find
out if a value is NULL? In Delphi I can do that using the IsNull method of
the TField.
I'm using Delphi2006 and RB 10.
Regards
Sven Langenkamp
CT Datentechnik GmbH
Eschenstr. 2
D-31582 Nienburg/Weser
Germany
Telefon: +49 [0] 5021 - 9724-15
Telefax: +49 [0] 5021 - 9724-18
http: www.ctdatentechnik.de
e-mail: langenkamp@ctdatentechnik.de
in some cases I have a NULL value inside a database value. This is a valid
value and I will display it in the report as blank (''). But I got 0 if the
value in the db is NULL. 0 and NULL are not the same. Is there a way to find
out if a value is NULL? In Delphi I can do that using the IsNull method of
the TField.
I'm using Delphi2006 and RB 10.
Regards
Sven Langenkamp
CT Datentechnik GmbH
Eschenstr. 2
D-31582 Nienburg/Weser
Germany
Telefon: +49 [0] 5021 - 9724-15
Telefax: +49 [0] 5021 - 9724-18
http: www.ctdatentechnik.de
e-mail: langenkamp@ctdatentechnik.de
This discussion has been closed.
Comments
----------------------------------------------
Tech Tip: RAP: Checking for Null Data Values
----------------------------------------------
The DataPipeline.FieldObjects[] array property provides access to the
TppField objects. TppField has an IsNull boolean property.
The notation is DataPipeline.FieldObjects['FieldName'].IsNull
example:
if Customer.FieldObjects['Addr1'].IsNull then
ShowMessage('field value is null');
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com