gnomemm r1939 - in libgnomedbmm/trunk: . examples/dicttypes examples/form/format examples/form/mandatory examples/form/simple examples/gnomedbmm-demo examples/grid/format examples/grid/headers examples/grid/restrict examples/grid/simple examples/grid/xmldict examples/program examples/queries/delete examples/queries/insert examples/queries/select examples/queries/simple examples/queries/update



Author: murrayc
Date: Sat Jan  3 22:22:47 2009
New Revision: 1939
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1939&view=rev

Log:
2009-01-03  Murray Cumming  <murrayc murrayc com>

* examples: Fix the build partly by updating the use of Connection, 
without Client.

Modified:
   libgnomedbmm/trunk/ChangeLog
   libgnomedbmm/trunk/examples/dicttypes/main.cc
   libgnomedbmm/trunk/examples/form/format/main.cc
   libgnomedbmm/trunk/examples/form/mandatory/main.cc
   libgnomedbmm/trunk/examples/form/simple/main.cc
   libgnomedbmm/trunk/examples/gnomedbmm-demo/main.cc
   libgnomedbmm/trunk/examples/grid/format/main.cc
   libgnomedbmm/trunk/examples/grid/headers/main.cc
   libgnomedbmm/trunk/examples/grid/restrict/main.cc
   libgnomedbmm/trunk/examples/grid/simple/main.cc
   libgnomedbmm/trunk/examples/grid/xmldict/main.cc
   libgnomedbmm/trunk/examples/program/main.cc
   libgnomedbmm/trunk/examples/queries/delete/main.cc
   libgnomedbmm/trunk/examples/queries/insert/main.cc
   libgnomedbmm/trunk/examples/queries/select/main.cc
   libgnomedbmm/trunk/examples/queries/simple/main.cc
   libgnomedbmm/trunk/examples/queries/update/main.cc

Modified: libgnomedbmm/trunk/examples/dicttypes/main.cc
==============================================================================
--- libgnomedbmm/trunk/examples/dicttypes/main.cc	(original)
+++ libgnomedbmm/trunk/examples/dicttypes/main.cc	Sat Jan  3 22:22:47 2009
@@ -27,15 +27,15 @@
 #endif
 {
   Glib::RefPtr<Gnome::Gda::Dict> dict = Gnome::Gda::Dict::create();
-  Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
+  
   Glib::ustring connection_string = "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db";
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string);
   dict->set_connection(cnc);
   dict->update_dbms_meta_data();
 #else
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */, Gnome::Gda::ConnectionOptions(0), error);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string, Gnome::Gda::ConnectionOptions(0), error);
   if(error.get() == NULL)
   {
     dict->set_connection(cnc);

Modified: libgnomedbmm/trunk/examples/form/format/main.cc
==============================================================================
--- libgnomedbmm/trunk/examples/form/format/main.cc	(original)
+++ libgnomedbmm/trunk/examples/form/format/main.cc	Sat Jan  3 22:22:47 2009
@@ -29,12 +29,12 @@
 #endif
 {
   Glib::RefPtr<Gnome::Gda::Dict> dict = Gnome::Gda::Dict::create();
-  Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
+  
   Glib::ustring connection_string = "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db";
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
   // Create a connection to the embedded sqlite database
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string);
 
   // We use a Gda::Dict here to read the information how to map DMBS types to Gda types from an xml file.
   // A Gda::Dict is a powerful repository to store informations about the underlying database and read/write them
@@ -42,7 +42,7 @@
   dict->set_connection(cnc);
   dict->update_dbms_meta_data();
 #else
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */, Gnome::Gda::ConnectionOptions(0), error);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string, Gnome::Gda::ConnectionOptions(0), error);
   if(error.get() == NULL)
   {
     dict->set_connection(cnc);

Modified: libgnomedbmm/trunk/examples/form/mandatory/main.cc
==============================================================================
--- libgnomedbmm/trunk/examples/form/mandatory/main.cc	(original)
+++ libgnomedbmm/trunk/examples/form/mandatory/main.cc	Sat Jan  3 22:22:47 2009
@@ -29,12 +29,12 @@
 #endif
 {
   Glib::RefPtr<Gnome::Gda::Dict> dict = Gnome::Gda::Dict::create();
-  Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
+  
   Glib::ustring connection_string = "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db";
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
   // Create a connection to the embedded sqlite database
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string);
 
   // We use a Gda::Dict here to read the information how to map DMBS types to Gda types from an xml file.
   // A Gda::Dict is a powerful repository to store informations about the underlying database and read/write them
@@ -42,7 +42,7 @@
   dict->set_connection(cnc);
   dict->update_dbms_meta_data();
 #else
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
   if(error.get() == NULL)
   {
     dict->set_connection(cnc);

Modified: libgnomedbmm/trunk/examples/form/simple/main.cc
==============================================================================
--- libgnomedbmm/trunk/examples/form/simple/main.cc	(original)
+++ libgnomedbmm/trunk/examples/form/simple/main.cc	Sat Jan  3 22:22:47 2009
@@ -29,12 +29,12 @@
 #endif
 {
   Glib::RefPtr<Gnome::Gda::Dict> dict = Gnome::Gda::Dict::create();
-  Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
+  
   Glib::ustring connection_string = "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db";
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
   // Create a connection to the embedded sqlite database
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string);
 
   // We use a Gda::Dict here to read the information how to map DMBS types to Gda types from an xml file.
   // A Gda::Dict is a powerful repository to store informations about the underlying database and read/write them
@@ -42,7 +42,7 @@
   dict->set_connection(cnc);
   dict->update_dbms_meta_data();
 #else
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */, Gnome::Gda::ConnectionOptions(0), error);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string, Gnome::Gda::ConnectionOptions(0), error);
   if(error.get() == NULL)
   {
     dict->set_connection(cnc);

Modified: libgnomedbmm/trunk/examples/gnomedbmm-demo/main.cc
==============================================================================
--- libgnomedbmm/trunk/examples/gnomedbmm-demo/main.cc	(original)
+++ libgnomedbmm/trunk/examples/gnomedbmm-demo/main.cc	Sat Jan  3 22:22:47 2009
@@ -43,7 +43,7 @@
   //demo_dict->extend_with_functions();
   std::string xml_filename = find_file("demo_dict.xml");
 
-  Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
+  
   std::string db_filename = find_file("demo_db.db");
   std::string dirname = Glib::path_get_dirname(db_filename);
   std::string cncstring = "DB_DIR=" + dirname + ";DB_NAME=demo_db";
@@ -54,7 +54,7 @@
   try
   {
     demo_dict->load_xml_file(xml_filename);
-    cnc = client->open_connection_from_string("SQLite", cncstring, "" /* username */, "" /* password */);
+    cnc = Gnome::Gda::Connection::open_from_string("SQLite", cncstring);
   }
   catch(const Glib::Error& e)
   {
@@ -65,7 +65,7 @@
   std::auto_ptr<Glib::Error> error;
   
   demo_dict->load_xml_file(xml_filename, error);
-  cnc = client->open_connection_from_string("SQLite", cncstring, "" /* username */, "" /* password */, Gnome::Gda::ConnectionOptions(0), error);
+  cnc = Gnome::Gda::Connection::open_from_string("SQLite", cncstring, Gnome::Gda::ConnectionOptions(0), error);
 
   if(error.get() != NULL)
   {

Modified: libgnomedbmm/trunk/examples/grid/format/main.cc
==============================================================================
--- libgnomedbmm/trunk/examples/grid/format/main.cc	(original)
+++ libgnomedbmm/trunk/examples/grid/format/main.cc	Sat Jan  3 22:22:47 2009
@@ -30,15 +30,15 @@
 #endif
 {
   Glib::RefPtr<Gnome::Gda::Dict> dict = Gnome::Gda::Dict::create();
-  Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
+  
   Glib::ustring connection_string = "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db";
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string);
   dict->set_connection(cnc);
   dict->update_dbms_meta_data();
 #else
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
   if(error.get() == NULL)
   {
     dict->set_connection(cnc);

Modified: libgnomedbmm/trunk/examples/grid/headers/main.cc
==============================================================================
--- libgnomedbmm/trunk/examples/grid/headers/main.cc	(original)
+++ libgnomedbmm/trunk/examples/grid/headers/main.cc	Sat Jan  3 22:22:47 2009
@@ -10,18 +10,18 @@
   std::auto_ptr<Glib::Error> error;
 #endif
 
-  Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
+  
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  Glib::RefPtr<Gnome::Gda::Connection> connection = client->open_connection_from_string("SQLite", "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db", "" /* username */, "" /* password */);
+  Glib::RefPtr<Gnome::Gda::Connection> connection = Gnome::Gda::Connection::open_from_string("SQLite", "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db");
 #else
-  Glib::RefPtr<Gnome::Gda::Connection> connection = client->open_connection_from_string("SQLite", "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db", "" /* username */, "" /* password */, Gnome::Gda::ConnectionOptions(0), error);
+  Glib::RefPtr<Gnome::Gda::Connection> connection = Gnome::Gda::Connection::open_from_string("SQLite", "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db", Gnome::Gda::ConnectionOptions(0), error);
   if(error.get() != NULL) return -1;
 #endif // GLIBMM_EXCEPTIONS_ENABLED
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  Glib::RefPtr<Gnome::Gda::DataModel> model = connection->execute_select_command("SELECT * FROM products");
+  Glib::RefPtr<Gnome::Gda::DataModel> model = connection->statement_execute_select("SELECT * FROM products");
 #else
-  Glib::RefPtr<Gnome::Gda::DataModel> model = connection->execute_select_command("SELECT * FROM products", error);
+  Glib::RefPtr<Gnome::Gda::DataModel> model = connection->statement_execute_select("SELECT * FROM products", error);
   if(error.get() != NULL) return -1;
 #endif // GLIBMM_EXCEPTIONS_ENABLED
 

Modified: libgnomedbmm/trunk/examples/grid/restrict/main.cc
==============================================================================
--- libgnomedbmm/trunk/examples/grid/restrict/main.cc	(original)
+++ libgnomedbmm/trunk/examples/grid/restrict/main.cc	Sat Jan  3 22:22:47 2009
@@ -30,15 +30,15 @@
 #endif
 {
   Glib::RefPtr<Gnome::Gda::Dict> dict = Gnome::Gda::Dict::create();
-  Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
+  
   Glib::ustring connection_string = "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db";
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string);
   dict->set_connection(cnc);
   dict->update_dbms_meta_data();
 #else
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
   if(error.get() == NULL)
   {
     dict->set_connection(cnc);

Modified: libgnomedbmm/trunk/examples/grid/simple/main.cc
==============================================================================
--- libgnomedbmm/trunk/examples/grid/simple/main.cc	(original)
+++ libgnomedbmm/trunk/examples/grid/simple/main.cc	Sat Jan  3 22:22:47 2009
@@ -30,15 +30,15 @@
 #endif
 {
   Glib::RefPtr<Gnome::Gda::Dict> dict = Gnome::Gda::Dict::create();
-  Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
+  
   Glib::ustring connection_string = "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db";
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string);
   dict->set_connection(cnc);
   dict->update_dbms_meta_data();
 #else
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
   if(error.get() == NULL)
   {
     dict->set_connection(cnc);

Modified: libgnomedbmm/trunk/examples/grid/xmldict/main.cc
==============================================================================
--- libgnomedbmm/trunk/examples/grid/xmldict/main.cc	(original)
+++ libgnomedbmm/trunk/examples/grid/xmldict/main.cc	Sat Jan  3 22:22:47 2009
@@ -32,13 +32,13 @@
   // File to try to read dictionary from
   std::string filename = "my_dict.xml";
 
-  Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
+  
   Glib::ustring connection_string = "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db";
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string);
 #else
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */, Gnome::Gda::ConnectionOptions(0), error);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string, Gnome::Gda::ConnectionOptions(0), error);
   if(error.get() != NULL) return;
 #endif // GLIBMM_EXCEPTIONS_ENABLED
   dict->set_connection(cnc);

Modified: libgnomedbmm/trunk/examples/program/main.cc
==============================================================================
--- libgnomedbmm/trunk/examples/program/main.cc	(original)
+++ libgnomedbmm/trunk/examples/program/main.cc	Sat Jan  3 22:22:47 2009
@@ -23,7 +23,7 @@
   Gtk::Main kit(argc, argv);
   Gnome::Db::init();
 
-  Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
+  
  
   Glib::RefPtr<Gnome::Gda::DataModel> model;
 
@@ -32,8 +32,8 @@
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
   try
   {
-    Glib::RefPtr<Gnome::Gda::Connection> connection = client->open_connection_from_string("SQLite", "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db", "" /* username */, "" /* password */);
-    model = connection->execute_select_command("SELECT * FROM products");
+    Glib::RefPtr<Gnome::Gda::Connection> connection = Gnome::Gda::Connection::open_from_string("SQLite", "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db");
+    model = connection->statement_execute_select("SELECT * FROM products");
   }
   catch(const Glib::Error& e)
   {
@@ -42,9 +42,9 @@
   }
 #else
   std::auto_ptr<Glib::Error> error;
-  Glib::RefPtr<Gnome::Gda::Connection> connection = client->open_connection_from_string("SQLite", "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db", "" /* username */, "" /* password */, Gnome::Gda::ConnectionOptions(0), error);
+  Glib::RefPtr<Gnome::Gda::Connection> connection = Gnome::Gda::Connection::open_from_string("SQLite", "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db", Gnome::Gda::ConnectionOptions(0), error);
   if(connection)
-    model = connection->execute_select_command("SELECT * FROM products", error);
+    model = connection->statement_execute_select("SELECT * FROM products", error);
 
   if(error.get() != NULL)
   {

Modified: libgnomedbmm/trunk/examples/queries/delete/main.cc
==============================================================================
--- libgnomedbmm/trunk/examples/queries/delete/main.cc	(original)
+++ libgnomedbmm/trunk/examples/queries/delete/main.cc	Sat Jan  3 22:22:47 2009
@@ -26,15 +26,15 @@
 #endif // GLIBMM_EXCEPTIONS_ENABLED
 {
   Glib::RefPtr<Gnome::Gda::Dict> dict = Gnome::Gda::Dict::create();
-  Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
+  
   Glib::ustring connection_string = "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db";
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string);
   dict->set_connection(cnc);
   dict->update_dbms_meta_data();
 #else
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
   if(error.get() != NULL) return;
 
   dict->set_connection(cnc);

Modified: libgnomedbmm/trunk/examples/queries/insert/main.cc
==============================================================================
--- libgnomedbmm/trunk/examples/queries/insert/main.cc	(original)
+++ libgnomedbmm/trunk/examples/queries/insert/main.cc	Sat Jan  3 22:22:47 2009
@@ -26,15 +26,15 @@
 #endif // GLIBMM_EXCEPTIONS_ENABLED
 {
   Glib::RefPtr<Gnome::Gda::Dict> dict = Gnome::Gda::Dict::create();
-  Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
+  
   Glib::ustring connection_string = "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db";
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string);
   dict->set_connection(cnc);
   dict->update_dbms_meta_data();
 #else
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
   if(error.get() != NULL) return;
 
   dict->set_connection(cnc);

Modified: libgnomedbmm/trunk/examples/queries/select/main.cc
==============================================================================
--- libgnomedbmm/trunk/examples/queries/select/main.cc	(original)
+++ libgnomedbmm/trunk/examples/queries/select/main.cc	Sat Jan  3 22:22:47 2009
@@ -26,15 +26,15 @@
 #endif // GLIBMM_EXCEPTIONS_ENABLED
 {
   Glib::RefPtr<Gnome::Gda::Dict> dict = Gnome::Gda::Dict::create();
-  Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
+  
   Glib::ustring connection_string = "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db";
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string);
   dict->set_connection(cnc);
   dict->update_dbms_meta_data();
 #else
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
   if(error.get() != NULL) return;
 
   dict->set_connection(cnc);

Modified: libgnomedbmm/trunk/examples/queries/simple/main.cc
==============================================================================
--- libgnomedbmm/trunk/examples/queries/simple/main.cc	(original)
+++ libgnomedbmm/trunk/examples/queries/simple/main.cc	Sat Jan  3 22:22:47 2009
@@ -26,15 +26,15 @@
 #endif
 {
   Glib::RefPtr<Gnome::Gda::Dict> dict = Gnome::Gda::Dict::create();
-  Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
+  
   Glib::ustring connection_string = "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db";
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string);
   dict->set_connection(cnc);
   dict->update_dbms_meta_data();
 #else
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
   if(error.get() != NULL) return;
 
   dict->set_connection(cnc);

Modified: libgnomedbmm/trunk/examples/queries/update/main.cc
==============================================================================
--- libgnomedbmm/trunk/examples/queries/update/main.cc	(original)
+++ libgnomedbmm/trunk/examples/queries/update/main.cc	Sat Jan  3 22:22:47 2009
@@ -26,15 +26,15 @@
 #endif // GLIBMM_EXCEPTIONS_ENABLED
 {
   Glib::RefPtr<Gnome::Gda::Dict> dict = Gnome::Gda::Dict::create();
-  Glib::RefPtr<Gnome::Gda::Client> client = Gnome::Gda::Client::create();
+  
   Glib::ustring connection_string = "DB_DIR=" LIBGNOMEDB_DATADIR ";DB_NAME=demo_db";
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "" /* username */, "" /* password */);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string);
   dict->set_connection(cnc);
   dict->update_dbms_meta_data();
 #else
-  Glib::RefPtr<Gnome::Gda::Connection> cnc = client->open_connection_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
+  Glib::RefPtr<Gnome::Gda::Connection> cnc = Gnome::Gda::Connection::open_from_string("SQLite", connection_string, "", "", Gnome::Gda::ConnectionOptions(0), error);
   if(error.get() != NULL) return;
 
   dict->set_connection(cnc);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]