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.

Bug 33634 - Cannot recreate table with BLOB, CLOB type
Summary: Cannot recreate table with BLOB, CLOB type
Status: VERIFIED WORKSFORME
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: -S1S-
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
: 33538 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-05-15 12:14 UTC by Martin Schovanek
Modified: 2006-03-29 09:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schovanek 2003-05-15 12:14:55 UTC
[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)
)
Comment 1 Martin Schovanek 2003-05-19 14:27:23 UTC
The jdbc:oracle:thin: driver has the same problem with FLOAT, REAL and
BLOB data types.
Comment 2 Radko Najman 2003-09-17 17:21:24 UTC
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.
Comment 3 Radko Najman 2003-09-17 17:22:59 UTC
*** Issue 33538 has been marked as a duplicate of this issue. ***
Comment 4 Andrei Badea 2005-10-06 12:12:08 UTC
Can't reproduce this bug anymore, probably the PointBase driver has been fixed.
Comment 5 Lukasz Grela 2006-03-29 09:39:46 UTC
v.