Problems with JDBC and a DISTINCT Boolean Type in a Row Type 
Author Message
 Problems with JDBC and a DISTINCT Boolean Type in a Row Type

Hello,
I have problems with receiving a named ROW TYPE with a Distinct
Boolean Type as Attribute. I am using JDBC 2.11 and IDS 2000
Version 9.20.UC2 under Solaris 7.

I got the error message:
 -79716 System or internal error java.sql.SQLException: Type requested
 (boolean) doesn't match row type information (udt fixed) type.

Receiving the Distinct Boolean type directly works fine.
And using a Distinct Int in the named row type instead of Boolean
works fine, too.

Are there any known problems about using Distinct Boolean Types
in named Row Types?
I haven't found anything in the documentation and the release notes.

I have tried it with SQLData and Struct and always got the same
error message.

Here is some SQL-code:

CREATE DISTINCT TYPE boolean_ty AS boolean;

CREATE ROW TYPE boolean_row( value boolean_ty);

CREATE TABLE boolean_ta OF TYPE boolean_row;

INSERT INTO boolean_ta VALUES('t');
INSERT INTO boolean_ta VALUES('f');

And an excerpt from the Java-Code where the error occurred:

...
// getting connection ... etc
...
// Setting up typemap
   customtypemap.put("boolean_ty", Class.forName("boolean_ty"));
   customtypemap.put("boolean_row", Class.forName("boolean_row"));
// Both classes generated with ClassGenerator
...
   stmt = conn.createStatement();
   ResultSet rs = stmt.executeQuery("select boolean_ta from
boolean_ta");
   while (rs.next())
    {
        boolean_row val = (boolean_row)rs.getObject(1);
        System.out.println("Value : " + val);
    }
    stmt.close();
...

Is this a known problem or does anybody has a solution for this problem?

                                Wolfgang

--
No-one ever thinks of themselves as one of Them. We're always one of Us.
It's Them that do the bad things. (Sir Vimes of Ankh-Morpork City Watch)



Wed, 18 Jun 1902 08:00:00 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. Oracle data type for Java boolean / JDBC BIT

2. JDBC + row type problem

3. Problem with call procedure Oracle THIN type boolean

4. Array Data Type return what type in JDBC?

5. JDBC type vs. DATABASE type

6. Informix JDBC driver? (type 4 or type 2)

7. Informix JDBC driver? (type 4 or type 2)

8. JDBC Type 3 vs Type 4

9. Type, sub-type, and sub-sub-type database design

10. [SQLServer JDBC Driver]Unhandled token type: ROW

11. Enum type emulation: problem with opaque type in PL/pgSQL functions

12. [HACKERS] Enum type emulation: problem with opaque type in PL/pgSQL functions


 
Powered by phpBB® Forum Software