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.
NetBeans 5.0: English version Windows: 2000 JA MySQL ODBC: 3.51 JDK: 1.5.0_05 I'm now trying to use JDBC-ODBC for MySQL on my Windows 2k Japanese. I downloaded MySQL ODBC 3.51 driver, installed it to my Win2K box. I created a new connection for the MySQL ODBC. Connection is OK but when I tried "View Data" from table, it returns all empty. See attachment. When I tried the same operation on 4.1 ml release, it displayed fine. So is this regression?? (See attachment) When I tried simply with "JDBC", it returns correct values in table.
Created attachment 29078 [details] screenshot - working on 4.1
Created attachment 29079 [details] screenshot - but the same operation failed on 5.0
Yes, it looks like a regression. What is the data type and effective collation and character set of that column? What is the MySQL server version? Are other data types displayed correctly? Also, what do you mean by "I tried with 'JDBC'"? Do you mean the Connector/J driver, or maybe a JDBC program that you wrote yourself to display the data in that table?
"JDBC" means that I tried another database connection with JDBC driver on Runtime tab. I did the same operation on Runtime tab, it works fine. I'll check MySQL version.
MySQL version is 4.0.22, running on Red Hat Enterprise Linux AS release 3. The table is LONGVARCHAR. I'm sorry I don't have another DB what I can try.
I can reproduce it. Caused by the SQL editor calling ResultSet.getObject() and then the typed getter based on the column data type, which in this case is ResultSet.getCharacterStream(). It does so in order to detect the NULL values (when getObject() returns null). But the getCharacterStream() method returns an empty stream if getObject() is called before it. It looks incorrect for the SQL editor to read the data twice for each column, so I will try to fix it to use ResultSet.wasNull() after having called the typed getter and not call getObject() at all. This unfortunately introduces a new bug, at least on reporter's configuration (JDBC-ODBC bridge and Connector/ODBC with MySQl 4.0): the NULL values are not detected properly, because ResultSet.wasNull() seems to return false for them. But this is a bug in the JDBC driver and I don't intend to work around it.
Fixed. 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.2; previous revision: 1.2.2.3.2.1 done