Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
JDBC ODA provider - getTableName from java.sql.ResultSetMetaData returns null.
ChrisXL
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.
Find more posts tagged with
Comments
There are no comments yet