Page 1 of 1

Database Explorer shows most fields filled with Null

Posted: Tue Jun 12, 2007 12:48 am
by amix
Hello,

I am using oXygen 8.2.0 on Eclipse 3.2.2 with Java 1.6.0_1 in connection with the accompying JDBC-ODBC bridge on WinXP Pro/SP2 and Christian Werner's ODBC SQlite3 driver. I have installed the driver and set it up in the MS ODBC Control Panel. I get a connection and all seems to be fine.

In the documentation to the Database Perspective I found this:
[...]Please note that you can also open an XML schema component in the editor by double-clicking it. To view the content of a table in the Table Explorer view double-click one of its fields.
It starts with the explorer. Most fields are displayed as '(null)'. It seems, that INT, SMALLINT UNSIGNED and DATETIME are the only fields being displayed with their values.

I am sure, that there is contents in those other fields because I use them already programatically.

Now my question: What happens ?

Could this be due to the ODBC driver I am using or could this be a Java thing or could this be an oXygen thing ?

I am so happy about the chance to access my database while doing work in Eclipse. I am just learning to use Django and it is sometimes nicer to have a direct view onto the db. And since I use Pydev and Aptana in Eclipse, there is the oXygen views just around the corner :-)

Posted: Wed Jun 13, 2007 2:21 pm
by sorin_ristache
Hello,

We need to generate a log file of accessing the ODBC source from oXygen in order to find why the table cells contain "null" instead of the values that you see by accessing the same database programatically. Please contact us to tell you how to obtain a log file.


Regards,
Sorin

Posted: Thu Jun 14, 2007 4:26 pm
by sorin_ristache
Thank you for the received details. We reproduced the error. It is caused by the ODBC SQlite3 driver which is queried by the standard ODBC-JDBC bridge's implementation of java.sql.ResultSet.getObject(int columnIndex) which returns null for table columns which are not of type integer or date/time. For example the driver must convert a VARCHAR value of the database table to a String value when ResultSet.getObject() is called but it returns null instead of the String value. We implemented a fix which you can use until the next release of oXygen by replacing [Eclipse3.2-install-folder]/plugins/com.oxygenxml.editor_8.2.0/lib/oxygenEclipse.jar with this patched version.


Regards,
Sorin

Posted: Fri Jun 15, 2007 12:27 am
by amix
Thank you very much for your help.

I have just emailed Christian this thread's link. Maybe he is interested in it/can do something about it.

It was nice to find a patch rather than becoming a ping pong ball ("No, please contact the driver's author", etc.) ;-)