[libgda/LIBGDA_5.0] GdaSql: automatically update meta store for virtual connections



commit f4b613b87afc371b105bb6f1d63b2ea2b69b02f0
Author: Vivien Malerba <malerba gnome-db org>
Date:   Mon Jan 9 22:06:39 2012 +0100

    GdaSql: automatically update meta store for virtual connections

 tools/gda-sql.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/tools/gda-sql.c b/tools/gda-sql.c
index 35b3c50..5a04563 100644
--- a/tools/gda-sql.c
+++ b/tools/gda-sql.c
@@ -3341,12 +3341,14 @@ extra_command_bind_cnc (SqlConsole *console, G_GNUC_UNUSED GdaConnection *cnc, c
 		vprovider = gda_vprovider_hub_new ();
 	g_assert (vprovider);
 
-	virtual = gda_virtual_connection_open (vprovider, NULL);
+	virtual = gda_virtual_connection_open_extended (vprovider, GDA_CONNECTION_OPTIONS_THREAD_SAFE |
+							GDA_CONNECTION_OPTIONS_AUTO_META_DATA, NULL);
 	if (!virtual) {
 		g_set_error (error, 0, 0, "%s", _("Could not create virtual connection"));
 		return NULL;
 	}
 	g_object_set (G_OBJECT (virtual), "execution-timer", TRUE, NULL);
+	gda_connection_get_meta_store (virtual); /* force create of meta store */
 
 	/* add existing connections to virtual connection */
 	string = g_string_new (_("Bound connections are as:"));



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