This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
ResultSetTableModelSupport.createColumnDefs(...) calls ResultSetMetaData.isWritable(...). But if this property isn't supported,(eg. demo version of Teradata DB), driver throws exception and result can not be viewed. This fix worked for me: public static List/*<ColumnDef>*/ createColumnDefs(ResultSetMetaData rsmd) throws SQLException { ... boolean writable = false; try{ writable = rsmd.isWritable(i) && ctd.isWritable(); } catch (Exception e){ } ColumnDef column = new ColumnDef( rsmd.getColumnName(i), writable, ctd.getColumnClass());
Thank you for the code. I will commit it (see below), although unwillingly, since it is not a fix, but a workaround for something which looks like a bug in the driver. Please put pressure on the driver vendor to fix the bug. Which exception does the driver throw? Is it a SQLException or something else? Can I catch SQLException instead of Excepton?
Ok, thanks. This is SQLException: java.sql.SQLException: [NCR][Teradata JDBC Driver]:TeraResultSetMetaData: function not supported in this version at com.ncr.teradata.ComUtil.ThrowExcp(Unknown Source) at com.ncr.teradata.TeraResultSetMetaData.isWritable(Unknown Source) at org.netbeans.modules.db.sql.execute.ResultSetTableModelSupport.createColumnDefs (ResultSetTableModelSupport.java:370) at org.netbeans.modules.db.sql.execute.ui.ResultSetTableModel.<init> (ResultSetTableModel.java:52)
Fixed. Thank you for the info. Checking in src/org/netbeans/modules/db/sql/execute/ResultSetTableModelSupport.java; /cvs/db/core/src/org/netbeans/modules/db/sql/execute/ResultSetTableModelSupport.java,v <-- ResultSetTableModelSupport.java new revision: 1.2.2.3.2.3; previous revision: 1.2.2.3.2.2 done