Clients, Connections, and DataModels

Each application that uses libgnomedbmm must have a Gnome::Gda::Connection. This can be obtained from a Gnome::Gda::Client after you have created that client and called one of its open_connection() methods. See the reference documentation for Gnome::Gda::Client.

You may either provide all the connection details each time, or refer to the name of connection details that you previously stored in the user's session via Gnome::Gda::Config::save_data_source(). See the reference documentation for Gnome::Gda::Config.

Once you have a Connection you can, for instance, obtain a Gnome::Gda::DataModel via a SQL command, for use with UI widgets such as Gnome::Gb::Grid and Gnome::Gda::Form, as you will see in the following simple example, and in the chapters that describe these UI widgets.