|
From: Christian S. <cm...@ce...> - 2004-07-29 12:42:07
|
Hello. I belive this is a short comming of the libdbi-drivers as it looks today. By reading dbi-dev.h you will find this row part of dbi_row_t struct.: unsigned long long *field_sizes; /* NULL field = 0, string field = len, anything else = -1 */ But the drivers does not implemet it this way. I'll suggest that we change it so that: NULL field = -1, string field = len, anything else = 0 That way we will have distinction between NULL and a string of 0 chars (which is not the same as NULL). It would then be easy to implement a couple of funtions like: dbi_result_field_isnull(result, "fieldname"); or dbi_result_field_isnull_idx(result, 2); Regards, //Christian On Wednesday 28 July 2004 15.45, m.e...@ls... wrote: > Hi, > > I have been running some queries that return NULLs at times (in fields > that contain doubles). > > It looks as if you use dbi_result_get_double() you get 0 whenever the > query returned a NULL. > > How can I distinguish between a NULL and 0? It looks like I might have > missed something obvious here... > > Thanks, > > Max > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > _______________________________________________ > libdbi-users mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libdbi-users |