[libgda/LIBGDA_4.2] GdaSql: automatically update meta store for virtual connections



commit c454c29491d23409101acf73e127b541a2b7ba15
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 c867ae5..83671b9 100644
--- a/tools/gda-sql.c
+++ b/tools/gda-sql.c
@@ -3320,12 +3320,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]