V4MD - <null> results with lingo

Pierre Rossel agora07 at prossel.com
Mon Jul 23 16:15:12 CDT 2007


Hello,


> Hi Ruslan, hi all Director developers... please tell me what you  
> think about this post. I think it will be my last one on this topic.

Sorry for the delay.

Director has a special value to specify there is no value: void. 
Valentina (as other DB) has a special value to specify there is no value:
NULL.

<null> is an invalid and undocumented value in Director, so why use it ?
My opinion is that NULL values should be correctly returned as void value as
much as possible. 


> 1)
> myText = string(vcursor.field("fld_varchar").value) -- I'm using  
> lingo string() function
> myNumberAsAString = string(vcursor.field("fld_byte").value) -- I get  
> a string from a byte field if I need it
> 
> note that
> 
> put string(void)
> -- ""

I vote on this one. This is the simplest and we still have the ability to
use voidP to test for NULL values in Valentina field.

Should getstring() return void or an empty string if the field is NULL is a
good question we can discuss, but returning <null> in Director for a NULL
field is not an option and that is the first point to fix.

Pierre Rossel



More information about the Valentina mailing list