Yes, this functions solve my needs and the others users too. On Thu, Apr 17, 2008 at 8:19 AM, Markus Hoenicka <[EMAIL PROTECTED]> wrote: > Markus Hoenicka writes: > > char* dbi_result_fget_string_copy(dbi_result Result, const char* > > fieldname); > > char* dbi_result_fget_string_copy_idx(dbi_result Result, unsigned int > > fieldidx); > > int dbi_result_fbind_string_copy(dbi_result Result, const char* > > fieldname, char** bindto); > > > > Come to think of it, the following names may be more appropriate: > > dbi_result_get_as_string_copy() > dbi_result_get_as_string_copy_idx() > dbi_result_bind_as_string_copy() > > dbi_result_get_as_longlong() > dbi_result_get_as_longlong_idx() > dbi_result_bind_as_longlong() > >
The dbi_result_get_string* can get all values string, integers, datetime, all type will be return as string (char *). And the function caller need to free the results appropriately. Ex.: char * v; v = dbi_result_fget_string_copy(result, "my_date"); printf("This is a date: %s", v); -----> This is a date: 2008-04-17 10:38:00 v = dbi_result_fget_string_copy(result, "my_bignumber"); printf("This is a bignumber: %s", v); -----> This is a date: 109456135 How we will automatically convert the types into strings formats, inside dbi_result_fget_string*? Meanwhile, the dbi_result_get_as_longlong* return integers. What will be the retur If this get a string? > > regards, > Markus > > -- > Markus Hoenicka > [EMAIL PROTECTED] > (Spam-protected email: replace the quadrupeds with "mhoenicka") > http://www.mhoenicka.de > -- ----------------------------------------------------------- João Henrique Freitas - joaohf_at_gmail.com Campinas-SP-Brasil BSD051283 LPI 1 http://joaohf.pbwiki.com http://www.livejournal.com/users/joaohf/ ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ libdbi-users mailing list libdbi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-users