The CodeExampleGdaSelect example opens a connection, executes a SELECT query and dumps the contents of the result to the standard output.
Sereral examples are delivered within the samples/ directory of Libgda's source distribution (make sure to read the README file in each directory):
F-Spot/: and example of F-Spot database repair tool (using virtual connections)
Virtual/: virtual connection usage example
The CodeExampleGrid example displays a login dialog to let the user select a DSN (or declare a new one), runs a simple SELECT query and displays the contents of the returned data set in a grid, as show in the screenshot below: