I can't find working libdbi version

Christoph Holtermann c.holtermann at gmx.de
Sat Jan 29 18:56:35 EST 2011


YEAH !

It loads !

The remaining problem was that you need to change the locale earlier.
like

gnc_push_locale( LC_NUMERIC, "C");
    dbi_result_free( result );
    result = dbi_conn_query( conn, "SELECT * FROM numtest" );
    if ( result == NULL )
    {
        const char *errmsg;
        dbi_conn_error( conn, &errmsg );
        PWARN("Test_DBI_Library: Failed to retrieve test row into table: %s",
              errmsg );
        result = dbi_conn_query( conn, "DROP TABLE numtest" );
        return FALSE;
    }
    while ( dbi_result_next_row( result ))
    {
       
        resultlonglong = dbi_result_get_longlong( result, "test_int" );
        resultulonglong = dbi_result_get_ulonglong( result, "test_unsigned" );
        resultdouble = dbi_result_get_double( result, "test_double" );
       
    }
    gnc_pop_locale( LC_NUMERIC );

during the while loop it seems to be too late. Maybe parsing is already done while
dbi_conn_query.

OK ! I can pass the error message. I wonder if my data is correct ;-)

regards,

Christoph Holtermann


More information about the gnucash-devel mailing list