After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 572393 - gda_connection_open_from_string should create connections strings transparently
gda_connection_open_from_string should create connections strings transparently
Status: RESOLVED OBSOLETE
Product: libgda
Classification: Other
Component: general
3.99.x
Other All
: Normal minor
: ---
Assigned To: malerba
gnome-db Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-02-19 10:11 UTC by Piotr Pokora
Modified: 2018-09-21 13:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Piotr Pokora 2009-02-19 10:11:06 UTC
gda_connection_open_from_string is well documented, however it misses few important points: when using SQLite provider you have to pass DB_DIR key and TNSNAME one when you use Oracle provider. Also GDA3 expects 'USER' key while GDA4 expects 'USERNAME'. I expect any application which provides abstract database access based on GDA, "abuses" own code with many conditional control blocks which could be implemented (and encapsulated) by GDA itself.

Other information:
Comment 1 malerba 2009-02-23 16:13:23 UTC
You mean Libgda should provide a way for testing if the connection parameters passed in a connection string are valid (all required are present, there is no incoherence between them, ...)?
Comment 2 Piotr Pokora 2009-02-23 18:16:45 UTC
Well... two cases:

1. I couldn't connect to Oracle DB, and I found out that TNSNAME has been missed in connection string. The others parameters stays the same for Oracle ,so for such case, gda could add TNSNAME transparently.

2. I couldn't connect to MySQL DB using GDA4. Just because GDA4 expects USERNAME while GDA3 expects USER. It's a little annoying.

I thought about generic structure which could be used to open connection with (in case when you do not use gda' xml configuration). Main point is, that's so easy to make mistake while handling data which could be handled transparently by GDA.
Comment 3 Murray Cumming 2011-12-01 08:03:59 UTC
Note that the gda_connection_open_from_string() documentation
  http://developer.gnome.org/libgda/unstable/GdaConnection.html#gda-connection-open-from-string
mentions that gda_config_get_provider_info() can tell you what authentication parameters are possible:
  http://developer.gnome.org/libgda/unstable/libgda-5.0-Configuration.html#gda-config-get-provider-info
though 
a) That does not document what the meaning of each parameter is, or whether it is _required_.
b) I wish that they were just listed right there in the API documentation.


I have no idea what TNSNAME means, or if it can be abstracted. I guess we need that list of all the parameters so we can start to think about how they can be unified.


> GDA4 expects USERNAME while GDA3 expects USER.

Well, that's a different issue (of backwards compatibility).
Comment 4 GNOME Infrastructure Team 2018-09-21 13:38:43 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/libgda/issues/38.