From: <mie...@us...> - 2013-03-28 23:19:34
|
Revision: 9145 http://sourceforge.net/p/oorexx/code-0/9145 Author: miesfeld Date: 2013-03-28 23:19:32 +0000 (Thu, 28 Mar 2013) Log Message: ----------- ooSQLite - fix problem with populating arrays when some values are SQL NULL Modified Paths: -------------- incubator/ooSQLite/src/ooSQLite.cpp Modified: incubator/ooSQLite/src/ooSQLite.cpp =================================================================== --- incubator/ooSQLite/src/ooSQLite.cpp 2013-03-27 23:47:47 UTC (rev 9144) +++ incubator/ooSQLite/src/ooSQLite.cpp 2013-03-28 23:19:32 UTC (rev 9145) @@ -2039,7 +2039,14 @@ for ( int i = 0; i < ncols; i++ ) { - c->ArrayAppendString(header, headers[i], strlen(headers[i])); + if ( values[i] == NULL ) + { + c->ArrayPut(record, d->nullObj, i + 1); + } + else + { + c->ArrayAppendString(record, values[i], strlen(values[i])); + } } c->ArrayPut(rows, header, 1); @@ -4647,6 +4654,7 @@ } cbc.callbackContext = context->threadContext; + cbc.nullObj = pConn->nullObj; if ( argumentExists(4) ) { |