## Connecting

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();
            }

| Creates the connection pool.
| Creates the connection to calvaris data source with the default username and password you have specify when creating the data source. However, you can specify them if you want.
| It's a good practice to close connections when you finish using them. It doesn't mean that you must close them each time you use them. It's better to open the connections when program starts and use them during the whole execution. This function frees the GdaConnection objects attached to the GdaClient.
| When finishing with the client, I have to free it.