Start a new topic

Problems with Grid Editor and DB2 since version 8.0.6

[This topic is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

Hi, with the new version 8.0.6. the Grid Editor doesn't show all icons anymore (see attached screenshot "Grid Editor 8.0.6. - Bug.jpg"). The problem only occurs for DB2 connections (Database Type: DB2 z/OS, preinstalled DB2 JDBC driver). With a in parallel installed version 8.0.5. with same program and connection settings the Grid Editor works as expected (see attached screesnhot "Grid Editor 8.0.5. - Working.jpg"). I also noticed that when I run a SQL query with version 8.0.5. I see in the result set the original column names. With version 8.0.6. I see the the translated column *descriptions* but not the column names. Attached you can see also the different context menus of the Grid Editor ("Context Menu 8.0.5 - Working.jpg" and Grid Editor 8.0.6 - Bug.jpg"). Thanks and kind regards Florian Edited by: flotux on 09.12.2011 12:16 Edited by: flotux on 09.12.2011 12:18 Edited by: flotux on 09.12.2011 12:18

[This reply is migrated from our old forums.]

Re: Problems with Grid Editor and DB2 since version 8.0.6
Florian, In 8.0.6 column names are displayed first by any column alias and secondly if no alias is used, the column name. Note that this depends on what database and driver being used. Ex: select col1 as 'Name', col2 as 'Address' from tab The names listed in DbVisualizer will be: Name Address So if you want to present the real column names instead of aliases, simply remove the alias from the column list in your select statement. This will also enable the table data editing. (We will look into a fix for the next maintenance version so that even if you use column aliases, editing support will be enabled). Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: Problems with Grid Editor and DB2 since version 8.0.6
Hi Roger, thanks for your answer. In my simple SQL statement (select * from tablename;) I used for the screenshot I didn't use any alias. Therefore it was a big suprise to see the long description of the table columns. I used the same simple statement in version 8.0.5 and 8.0.6. and got different results (once with simple column names and once with long description of tables). As I had this effect only with DB2 connections (works with MSSQL and Oracle connections) I assume that it has something to do with the DB2 JDBC driver. Did the DB2 JDBC driver change from version 8.0.5 to 8.0.6. ? Kind regards Florian Edited by: flotux on 12.12.2011 11:06
[This reply is migrated from our old forums.]

Re: Problems with Grid Editor and DB2 since version 8.0.6
Florian, Can you please post or email screenshot(s) with the names visible? It is difficult to determine what is going on based on the scrambled names. Regards Roger support@dbvis.com
[This reply is migrated from our old forums.]

Re: Problems with Grid Editor and DB2 since version 8.0.6
Florian, I suspect there a LABELs assigned to each of the columns in the table you are selecting from. If this is the case I also assume you are using version 4+ of the JDBC driver. There is a change in the DB2 version 4+ driver that handles column names and labels differently compared to older versions. This in combination with the minor change we introduced in DbVisualizer 8.0.6 gives the effect you have reported. A simple workaround is that you set the following driver property for the actual database connection: useJDBC4ColumnNameAndLabelSemantics = 2 The driver property is set by first selecting the database connection in DbVisualizer and then click the "Properties" tab. Now select the "Driver Properties" category in the list and either locate the above property and set the value or insert the parameter and set the value. Press Apply, re-connect and verify that it works. Let me know the progress. Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

Re: Problems with Grid Editor and DB2 since version 8.0.6
Hi Roger, I've added the driver option as you've described (see attached screenshot) but it still doesn't work. Attached you also find the labels as shown in 8.0.6. and the real column names as in 8.0.5. Thanks for your support! Kind regards Florian
[This reply is migrated from our old forums.]

Re: Problems with Grid Editor and DB2 since version 8.0.6
Florian, What version of the JDBC driver are you using? It is listed in the Connection message when connected (Connection tab). Right-click, select Copy and then paste in a reply. Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: Problems with Grid Editor and DB2 since version 8.0.6
When I connect I see the following driver version in the log window: DB2 DSN09010 IBM DB2 JDBC Universal Driver Architecture 3.57.82
[This reply is migrated from our old forums.]

Re: Problems with Grid Editor and DB2 since version 8.0.6
Thanks So then you are not using a 4+ version of the driver as my previous post was about. Please try upgrade the JDBC driver to version 4 and give the suggestion another try. You find the DB2 drivers here: http://www-01.ibm.com/software/data/db2/ad/java.html Regards Roger Ps. We will look into a fix in the next version of DbVisualizer so that you can toggle between showing column names or aliases in the result set grid.
[This reply is migrated from our old forums. The original author name has been removed]

Re: Problems with Grid Editor and DB2 since version 8.0.6
Hi Roger, I've downloaded version 4 of the DB2 JDBC driver. Together with the driver option the column names and the data grid icons are now visible again. Thanks a lot for your great support! Kind regards Florian
[This reply is migrated from our old forums. The original author name has been removed]

Re: Problems with Grid Editor and DB2 since version 8.0.6
Upgrade JDBC driver to version 4 and set driver option useJDBC4ColumnNameAndLabelSemantics to "2".
[This reply is migrated from our old forums.]

Re: Problems with Grid Editor and DB2 since version 8.0.6
Florian, Just to inform you that this is now fixed in the new 8.0.7 version. The special driver property is not needed. Regards Roger