| GNOME Data Access manual |
|---|
You can manage errors with GdaError class and obtain them with function gda_connection_get_errors() so let's see them and an example:
Here you see the functions to manage errors:
Here you can see an example of using this:
gboolean
get_errors (GdaConnection *connection)
{
GList *list;
GList *node;
GdaError *error;
list = (GList *) gda_connection_get_errors (connection);
for (node = g_list_first (list); node != NULL; node = g_list_next (node))
{
error = (GdaError *) node->data;
g_print ("Error no: %d\t", gda_error_get_number (error));
g_print ("desc: %s\t", gda_error_get_description (error));
g_print ("source: %s\t", gda_error_get_source (error));
g_print ("sqlstate: %s\n", gda_error_get_sqlstate (error));
}
}
![]() |
Obtains errors list. |
![]() |
Loop for getting error information. |
| << Transactions and batch processes | Full example >> |