jdbcnetbeansibm-midrangedb2-400jtopen

Why does Netbeans 8.1 database results not allow CrUD or "Show SQL" operations when using JTOpen on a DB2 database?


Anyone know why the Netbeans IDE's Database result explorer disables CrUD operations and "Show SQL 'CrUD' Operation" when using a JDBC connection via JTOpen 9.1 driver to a DB2 for i database with Netbeans 8.1?

JTOpen is a open source JDBC driver to IBM i DB2 for i database in addition to bunch of Java Classes for interacting with the IBMi system. http://jt400.sourceforge.net/

Screenshot of missing insert CrUD operations and Show SQL Scripts

I tried a few JDBC connection properties but no cigar... Tried a few different JDBC connection properties

I guess i'll have to keep browsing the IBM KB http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzahh/jdbcproperties.htm

and the JT400 source https://github.com/devjunix/libjt400-java/blob/master/src/com/ibm/as400/access/JDProperties.java


Solution

  • Add "extended metadata=true" in the connection properties fixed my issue.

    https://godzillai5.wordpress.com/2016/08/21/jdbc-jt400-setting-to-get-crud-and-show-sql-features-added-in-netbeans-with-ibm-db2-for-i/

    The IBM documentation here http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/rzahh/jdbcproperties.htm

    "extended metadata"
    Specifies whether the driver requests extended metadata from the server. Setting this property to true increases the accuracy of the information returned from the following ResultSetMetaData methods: getColumnLabel(int) isReadOnly(int) isSearchable(int) isWriteable(int)

    apparently readonly for the result set is incorrectly assumed true, unless the ext. metadata comes back with the actual value for isReadOnly(int). I'm guessing that its assumed false because on the initial connection the connection property "Read Only" is true. It would be helpful to understand what setting on the system or the Library/Schema is causing the connection to have that property.