Re: [gnome-db] database xml - xml database new from uri



Le lun 25/08/2003 à 19:34, Philippe CHARLIER a écrit :
> Le sam 23/08/2003 à 22:03, Rodrigo Moya a écrit :
> > On Fri, 2003-08-22 at 14:06 +0200, Philippe CHARLIER wrote:
> > > Hi,
--<SNIP>--
> > > 
> > > Well, I get an empty database ???
> > > 
> > > <?xml version="1.0"?>
> > > <database name="airports" version="0.91.0"/>
> > > 
> > > instead of the data that I have in the file :
> > > 
> > > <?xml version="1.0"?>
> > > <database name="airports" version="0.91.0"><tables><table
> > > name="airport"><field name ......... </tables></database>
> > > 
> > > Is it normal that "gda_xml_database_new_from_uri()" just create an empty
> > > database with the name and uri of the one on the disk (without the
> > > tables and tables datas) ?
> > > 
> > no, it's not normal. There is missing code in one function which I am
> > adding as we speak. As soon as it's in CVS I'll send a message to the
> > list so that you can get it and test it.
> > 
> > sorry for the inconveniences, but thanks to you, we'll have a fully
> > working GdaXmlDatabase, so just a bit of patience :-)
> > 
> > cheers
> > 
> 
> Hi, no inconvenience at all ;)
> 
> I was looking to the code of "_new_from_uri" and it seems to me that the
> problem is on the test "if (table)" always true just after "table =
> gda_table_new(name)" in the function
> "gda_xml_database_new_table_from_node()".
> 
> I wait for your new version and keep you advise ASAP.
> 
> Phil

I quickly tried with the new CVS version, it is always the same : an
empty database.

I tried once again, commenting out the following code in
"gda_xml_database_new_table_from_node()" :

-----
table = gda_table_new (name);
//if (table) {
//  gda_log_error (_("Table %s already exists"), name);
//  return NULL;
//}
-----

I know it is certainly not the solution, nor a good idea to suppress
this test, but I did it for troubleshooting.

Now the tables are created (I get lot of other problems, but the tables
are created ;-)

I take the opportunity to ask another question related to the error
messages appearing in the source code (with "gda_log_error").
How is it possible to take track of them in my program.
Now, if f.e. a table could not be created, the return value is just
NULL, but I am unable to find why as I am unable to get the error
message.

Thnks

Phil




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