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



On Wed, 2009-06-17 at 10:58 +0200, Vivien Malerba wrote:


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

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"/>
  </section>

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"?>
<libgda-config>
...your DSN here...
</libgda-config>



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.

Which version of Libgda are you using?
 

Fedora 11 packages 4.0.0, so yes it is not the latest version....

[root ams bas]# rpm -qa | grep libgda
libgda-devel-4.0.0-1.fc11.x86_64
libgda-postgres-4.0.0-1.fc11.x86_64
libgda-mysql-4.0.0-1.fc11.x86_64
libgda-4.0.0-1.fc11.x86_64



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