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.
[Nb Build S1S5, jdk1.4.1, jdbc:pointbase:server] Step to reproduce: ------------------ 1) create table: create table "NEW"."AA"("cb" CLOB, "bl" BLOB) 2) grab structure, recreate table Err message appears:1 Data type LONGVARCHAR, LONGVARBINARY is not valid SQL type ... - Recreate table script: create table "AA" ( "bl" LONGVARBINARY(1) "cb" LONGVARCHAR(1) )
The jdbc:oracle:thin: driver has the same problem with FLOAT, REAL and BLOB data types.
This is partially Database Explorer design issue and partially PointBase JDBC driver issue. The table definition which is used to recreate the table is genereted from information provided by java.sql.DatabaseMetaData.getColumns() method. DATA_TYPE value is used to generate the column data type. PointBase driver returns value (java.sql.Types) -4 for BLOB and -1 for CLOB. It is wrong. It should return 2004 for BLOB and 2005 for CLOB according to the JDBC specification. That's why LONGVARBINARY and LONGVARCHAR are generated. Their values in java.sql.Types are -4 and -1. It would be probably better to use TYPE_NAME value from java.sql.DatabaseMetaData.getColumns() to generate the correct data type. This value returns the real name of the data type in the database so in this case the implementation would not depend on the fact if DATA_TYPE returns correct value or not.
*** Issue 33538 has been marked as a duplicate of this issue. ***
Can't reproduce this bug anymore, probably the PointBase driver has been fixed.
v.