JDBC ODA provider - getTableName from java.sql.ResultSetMetaData returns null.
In our application, we have a system where we store meta information about
our database - for example labels for database columns. We want to use this
meta information in our BIRT reports.
My first task is to use this label as the display label in the BIRT dataset.
To achieve this I have customised the JDBC ODA provider. I have changed the
method
org.eclipse.birt.report.data.oda.jdbc.ResultSetMetaData#getColumnLabel(int)
to look up the required label from our meta system. However to do this I
need to know the table that the column is from. This should be available
from the getTableName() method on the underlying JDBC ResultSetMetaData, but
this is always returning null.
I am using the JTDS driver (SQL Server database) and the getTableName()
method works fine when run from a standalone test class. In the test class I
used the same jtds.jar, the SQL that I was running through BIRT, and I
obtained the ResultSetMetaData from a preparedStatement that had not yet
been executed - as in the JDBC ODA driver.
I can only think that this is something to do with how the
org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager gets the database
connection.
Any help with this appreciated.
Chris.
our database - for example labels for database columns. We want to use this
meta information in our BIRT reports.
My first task is to use this label as the display label in the BIRT dataset.
To achieve this I have customised the JDBC ODA provider. I have changed the
method
org.eclipse.birt.report.data.oda.jdbc.ResultSetMetaData#getColumnLabel(int)
to look up the required label from our meta system. However to do this I
need to know the table that the column is from. This should be available
from the getTableName() method on the underlying JDBC ResultSetMetaData, but
this is always returning null.
I am using the JTDS driver (SQL Server database) and the getTableName()
method works fine when run from a standalone test class. In the test class I
used the same jtds.jar, the SQL that I was running through BIRT, and I
obtained the ResultSetMetaData from a preparedStatement that had not yet
been executed - as in the JDBC ODA driver.
I can only think that this is something to do with how the
org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager gets the database
connection.
Any help with this appreciated.
Chris.
0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 144 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management