----- Ursprungligt Meddelande -----
Från: hakan <hexit34@users.sourceforge.net>
Till: Staffan Tylen <staffan.tylen@gmail.com>
Datum: torsdag, 07 februari 2013 17:47
Ämne: Re: [Oorexx-users] ooSQLite default NULL value
I was afraid of that :-)
How will you distinguish a real "" from NULL/.NIL if default is set to "", it can be/often is important to know the real value.
If Mark is to implement a default value I hope that the current returned value is kept as is, without a need to specify a default value ie. no change to current returned value.

----- Ursprungligt Meddelande -----
Från: Staffan Tylen <staffan.tylen@gmail.com>
Till: <hexit34@users.sourceforge.net> , Open Object Rexx Users <oorexx-users@lists.sourceforge.net>
Datum: torsdag, 07 februari 2013 17:23
Ämne: Re: [Oorexx-users] ooSQLite default NULL value
What do you mean, NULL is NULL (.NIL is .NIL)
and default to what ? NULL or .NIL or "something else", if "something else" the I suggest you populate the tablevalue with "something else" when tablevalue is written.

If I do this:

b = a~exec("select * from tbl1",.true,.oosqlite~oo_array_of_array)

then b will contain x number of arrays, where some of the values might by The NIL Object (.NIL) indicating that the value is NULL in the db.
Depending on the code one may have to manually test for .NIL to avoid syntax errors and other unwanted situations when manipulating the array values.
By doing for example:

a~defaultNULL = ""

one can be sure that no .NIL values exist in the arrays. Or one might use a~defaultNULL = "NULL" or a~defaultNULL = "Undecided" or whatever might be best in that situation.

I hope this helps.