gda-dev does not compile

Mark Johnson mrj001 at shaw.ca
Mon Dec 18 16:37:16 EST 2006


Daniel Espinosa wrote:

> I strongly recomend to install libgnomedb also, becouse it install a
> graphical tool called "gnome-database-properties" wich you can create
> the data source (DSN), the username and password to connecto to any
> data base server or SQLite, and you can test the connection, even see
> the tables and it's contents, and more.
>
> It's better than try to modify the XML, I think, and error free.
>
> The gda_open_connection, expects to have a preconfigured (and tested)
> DSN with a username and password, before to call it; it's a convenient
> function to quickly use GDA I'd created (more in libgda.h file), it
> isn't documented yet, but I'll consider to add it, in the middle you
> can see the documentation in gda-init.c file from the CVS version.
>
Finally, got back to this.  Thanks for the tip, Daniel.
I compiled and installed libgnomedb (version 1.99.1; required a patch 
for an undefined reference to GTK_CELL_LAYOUT; see bug 387287).
http://bugzilla.gnome.org/show_bug.cgi?id=387287


It allowed me to create and test a connection.  The following is the new 
config file:
<?xml version="1.0"?>
<libgda-config>
  <section path="/apps/libgda/Datasources/SalesTest">
    <entry name="DSN" type="string" 
value="URI=/home/phil/.libgda/sales_test.db"/>
    <entry name="Description" type="string" value="Test database for a 
sales department"/>
    <entry name="Password" type="string" value=""/>
    <entry name="Provider" type="string" value="SQLite"/>
    <entry name="Username" type="string" value=""/>
  </section>
  <section path="/apps/libgda/Datasources/GnucashMySql">
    <entry name="Provider" type="string" value="MySQL"/>
    <entry name="DSN" type="string" 
value="DB_NAME=gnucash;HOST=enterprise.mrj;PORT=3306;USE_SSL=FALSE"/>
    <entry name="Description" type="string" value="Testing Gnucash on 
MySql"/>
    <entry name="Username" type="string" value="gnucash"/>
    <entry name="Password" type="string" value="kirk"/>
  </section>
</libgda-config>

Note that the username and password are present.

Here is the terminal session:
mj at ds9:/opt/gnucash-svn15224/bin$ ./gnucash gda://GnucashMySql


This is a development version. It may or may not work.
Report bugs and other problems to gnucash-devel at gnucash.org.
You can also lookup and file bug reports at http://bugzilla.gnome.org
The last stable version was GnuCash 2.0.2
The next stable version will be GnuCash 2.2

SQL error: Access denied for user 'mj'@'ds9.mrj' (using password: NO)
SQL error: Access denied for user 'mj'@'ds9.mrj' (using password: NO)
mj at ds9:/opt/gnucash-svn15224/bin$ ./gnucash gda://GnucashMySql:gnucash:kirk


This is a development version. It may or may not work.
Report bugs and other problems to gnucash-devel at gnucash.org.
You can also lookup and file bug reports at http://bugzilla.gnome.org
The last stable version was GnuCash 2.0.2
The next stable version will be GnuCash 2.2

Implementation missing: database_constraints_update_list() in 
gda-dict-database.c line 1167
Implementation missing: database_constraints_update_list() in 
gda-dict-database.c line 1167
Compiled: SELECT * from gncInvoice WHERE 
((book.guid='945a821dd4977ff24b34c13ccdc96297') AND (is_posted?=1) AND 
(posted_lot.is-closed?=0) AND (type~='Invoice') AND 
(date_due<='2006-12-25'))
gda_run_query(): SELECT * from gncInvoice WHERE 
((book.guid='945a821dd4977ff24b34c13ccdc96297') AND (is_posted?=1) AND 
(posted_lot.is-closed?=0) AND (type~='Invoice') AND 
(date_due<='2006-12-25'))


Note that the username and password from the config file are ignored.  
Instead, it requires them on the command line.  Once I did this, it 
created the tables in the db.

After a few minutes playing with it, I offer the following feedback:
1. It should use the username and password from the connection rather 
than requiring them on the command line.
2. The Save button should be removed (second choice: grayed out) from 
the toolbar as things are saved when entered.  So the db should not 
require the user to press the Save button.
3. After entering one transaction in my "checking account" (a deposit), 
I noted that my account balance was still zero.
4. The post_date and enter_date fields in the transactions table contain 
the values 0000-00-00.
5. When I restart gnucash, it re-opens the same database correctly.  The 
checking account still shows 0 balance, and the deposit.  When I quit 
this, I get a warning dialog about not saving changes.  Like the Save 
Button, I should not see this dialog as my data have already been saved.

Question: should I be filing bugs in bugzilla?

For number 5, the following was output on the terminal:
Implementation missing: database_constraints_update_list() in 
gda-dict-database.c line 1167
Implementation missing: database_constraints_update_list() in 
gda-dict-database.c line 1167
Compiled: SELECT * from gncInvoice WHERE 
((book.guid='a53bbf78c7837cc17992f81c7dad4dd9') AND (is_posted?=1) AND 
(posted_lot.is-closed?=0) AND (type~='Invoice') AND 
(date_due<='2006-12-25'))
gda_run_query(): SELECT * from gncInvoice WHERE 
((book.guid='a53bbf78c7837cc17992f81c7dad4dd9') AND (is_posted?=1) AND 
(posted_lot.is-closed?=0) AND (type~='Invoice') AND 
(date_due<='2006-12-25'))
Implementation missing: parsed_create_global_query_field() in 
gda-query-parsing.c line 1204
Implementation missing: parsed_create_global_query_field() in 
gda-query-parsing.c line 1204

I am concerned about the "Implementation missing" messages.  I am using 
version 1.99.1 of libgda.  Any idea what these messages are about?  
Could they be the cause of some of the above problems?

Mark





More information about the gnucash-devel mailing list