[libgda] JDBC provider: fixed connection parameters handling



commit 49ee8f593f8851a95e5b83197d59a129343d5888
Author: Vivien Malerba <malerba gnome-db org>
Date:   Sun May 26 16:14:59 2013 +0200

    JDBC provider: fixed connection parameters handling
    
    always use the URL parameter if present

 providers/jdbc/gda-jdbc-provider.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/providers/jdbc/gda-jdbc-provider.c b/providers/jdbc/gda-jdbc-provider.c
index f88b01b..a10844d 100644
--- a/providers/jdbc/gda-jdbc-provider.c
+++ b/providers/jdbc/gda-jdbc-provider.c
@@ -482,16 +482,17 @@ gda_jdbc_provider_open_connection (GdaServerProvider *provider, GdaConnection *c
 
        /* Check for connection parameters */
        gchar *url;
-       url = make_url_from_params (provider, cnc, params, auth);
-       if (!url) {
-               const gchar *cstr;
-               cstr = gda_quark_list_find (params, "URL");
-               if (!cstr) {
+       const gchar *cstr;
+       cstr = gda_quark_list_find (params, "URL");
+       if (cstr)
+               url = g_strdup (cstr);
+       else {
+               url = make_url_from_params (provider, cnc, params, auth);
+               if (!url) {
                        gda_connection_add_event_string (cnc,
-                                                        _("The connection string must contain the URL 
value"));
+                                                        _("Missing parameters to open database connection"));
                        return FALSE;
                }
-               url = g_strdup (cstr);
        }
 
        /* Check for username / password */


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