| GNOME Data Access manual |
|---|
To connect you need to use two functions. We use gda_client_new () to create a connection pool and use gda_client_open_connection () to create the specific connections to the different data sources.
void
do_stuff ()
{
GdaClient *client;
GdaConnection *connection;
list_providers ();
list_datasources ();
client = gda_client_new ();
g_print ("CONNECTING\n");
connection = gda_client_open_connection (client, "calvaris", NULL, NULL,
GDA_CONNECTION_OPTIONS_READ_ONLY);
g_print ("CONNECTED\n");
execute_some_queries (connection);
g_print ("ERRORS PROVED!\n");
process_accounts(connection);
gda_client_close_all_connections (client);
g_object_unref(G_OBJECT(client));
play_with_parameters();
gda_main_quit();
}




| <<< Beginning | Processing queries >>> |