Re: [gnome-db] Data Sources in libgda 4.0.

On Wed, 2009-06-17 at 09:21 +0200, Vivien Malerba wrote:
2009/6/17 Bas Driessen <bas driessen xobas com>

I am porting my applications from libgda 3 to 4. In order to even start, I need to have access to some data sources. libgnomedb is the tool to create those. However, in Fedora 11 this is broken (3.99.7). As soon as you press the new data source, the application crashes. Therefore, I decided to compile libgnomedb myself. However that failed. Output below in this message if interested.

Yes, I know about the problem, and it has been fixed in git, but not yet released (see bug #575469).

I have spent the last few weeks working on integrating Libgnomedb's features which are generic enough into a libgdaui library for which the sources are part of Libgda (of course their compilation is optional), so Libgnomedb won't have any new release. The reason for doing this are:
* it's hard to maintain 2 libraries which are so closely tied
* I wanted to have a control center for Libgda, but this was part only of Libgnomedb
* Same for a simple database structure browser: the one in Libgnomedb is useless and Mergeant is yet into another set of sources, so I've created a new one which will be part of Libgda's sources
* Some of Libgnomedb's widgets are not generic enough to be in a generic library

I plan to publish that work soon, and will make a 4.1.1 release with all this.

Understood. Sounds good. Does that mean that with libgda 4.1.1 the existing libgda API will break again or is that too early to tell?

Can someone please tell me where I put my data sources and how they should look like? In libgda 3, there was a dir .libgda that contained a file called config with a layout like this:

<section path="/apps/libgda/Datasources/stocksql">
    <entry name="DSN" type="string" value="DB_NAME=stock;HOST=localhost;PORT=5432"/>
    <entry name="Description" type="string" value="Stock database in PostgreSQL"/>
    <entry name="Password" type="string" value=""/>
    <entry name="Provider" type="string" value="PostgreSQL"/>
    <entry name="Username" type="string" value="test"/>

When I put this in place, libgda 4 is not picking this up. Can someone give me a sample of a libgda 4 data source, the name of that file and the location?

The way DSN are stored in V4 has not changed since V3, so if you copied the ~/.libgda/config file from V3, it should work with V4 as well. You can check that with:
> gda-sql -l

BTW, make sure you enclosed that DSN definition in the proper tags:
<?xml version="1.0"?>
...your DSN here...

Ok, if I put the config file in /etc/libgda-4.0 then the data sources are visible from libgda. However, if I put the config file in $HOME/.libgda/ then they are not visible. I am using the default install which comes with Fedora 11, so not sure if there are changes/settings there to disable the home directory setting. Anyway, for now this works for me, as I can now actually connect to a database and continue the porting.

Thanks for your help Vivian and I will probably be back shortly with some other queries :) 


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