[gnome-db] GdaConnectionEvent and GdaDataModel issues



Hi!

What is the way to get SQL query from GdaConnectionEvent?

gda_connection_event_get_description works while 
gda_connection_event_get_source and gda_connection_event_get_sqlstate
returns NULL.

Example code is:

g_signal_connect(G_OBJECT(connection), "error",
                        G_CALLBACK(_connect_cnc_callback), NULL);

static void _connect_cnc_callback(GdaConnection *cnc,
                GdaConnectionEvent *event, gpointer ud)
{
g_warning("Connection error: %s, No:(%li), src:%s \n\n SQL: %s",
                        gda_connection_event_get_description(event),
                        (long) gda_connection_event_get_code(event),
                        gda_connection_event_get_source(event),
                        gda_connection_event_get_sqlstate (event));
}

Output ( SQLite ):

Connection error: no such table: person, No:(0), src:(null)

 SQL: (null)

Output ( MySQL ): 

Connection error: Unknown column 'hashtype' in 'field list', No:(1054), src:gda-mysql

 SQL: Not available

Is there anything I do wrong here?

Also is bug for gda_data_model_get_column_index_by_name created or reported?
I didn't check libgda issue tracker recently and I have no account there , but this function 
simply can not work.

Piotras 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]