You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Robert Morse <rm...@mdesignz.com> on 2003/02/12 15:04:37 UTC

Oracle RAW Datatype

I have an existing Oracle 9i table that has several RAW columns
defined.  I noticed that Torque converts 'BINARY' types declared in the
schema file to 'LONG RAW'.  This doesn't work for me because the RAW
columns have indexes on them.  Before I simply try reading the table
with what Torque generates, has anyone faced this issue before?  Perhaps
Torque will read the columns declared as RAW without a problem?

Thanks.

-- 
"All motion is not progress, and all movement is not forward" (anon)
Key ID:  F0533BB6
Finger Print:  7F07 D9CD 266F 29D4 3616  164D F055 6E4C F053 3BB6



Re: Oracle RAW Datatype

Posted by Robert Morse <rm...@mdesignz.com>.
Last update on this...

Getting a Torque.getConnection, and then using a PreparedStatement and
ResultSet works just fine.  Wish it would work with Criteria, and
doSelect().




On Wed, 2003-02-12 at 06:32, Bill Schneider wrote:
> Haven't tried this but I imagine that from Torque's perspective (JDBC +
> Village), RAW and LONG RAW are handled equivalently. In both cases,
> PreparedStatement.setBytes and ResultSet.setBytes should take/return a
> byte[].  The distinction between the two may only be important in the
> database itself.
> 
> -- Bill
> ----- Original Message -----
> From: "Robert Morse" <rm...@mdesignz.com>
> To: <to...@db.apache.org>
> Sent: Wednesday, February 12, 2003 9:04 AM
> Subject: Oracle RAW Datatype
> 
> 
> > I have an existing Oracle 9i table that has several RAW columns
> > defined.  I noticed that Torque converts 'BINARY' types declared in the
> > schema file to 'LONG RAW'.  This doesn't work for me because the RAW
> > columns have indexes on them.  Before I simply try reading the table
> > with what Torque generates, has anyone faced this issue before?  Perhaps
> > Torque will read the columns declared as RAW without a problem?
> >
> > Thanks.
> >
> > --
> > "All motion is not progress, and all movement is not forward" (anon)
> > Key ID:  F0533BB6
> > Finger Print:  7F07 D9CD 266F 29D4 3616  164D F055 6E4C F053 3BB6
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-user-help@db.apache.org
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
-- 
"All motion is not progress, and all movement is not forward" (anon)
Key ID:  F0533BB6
Finger Print:  7F07 D9CD 266F 29D4 3616  164D F055 6E4C F053 3BB6



Re: Oracle RAW Datatype

Posted by Robert Morse <rm...@mdesignz.com>.
As a follow-up, using a Criteria and criteria.add() with the second
argument being a byte[] for the RAW column, results in a:

java.sql.SQLException:  ORA-00936:  missing expression

being thrown.



On Wed, 2003-02-12 at 06:32, Bill Schneider wrote:
> Haven't tried this but I imagine that from Torque's perspective (JDBC +
> Village), RAW and LONG RAW are handled equivalently. In both cases,
> PreparedStatement.setBytes and ResultSet.setBytes should take/return a
> byte[].  The distinction between the two may only be important in the
> database itself.
> 
> -- Bill
> ----- Original Message -----
> From: "Robert Morse" <rm...@mdesignz.com>
> To: <to...@db.apache.org>
> Sent: Wednesday, February 12, 2003 9:04 AM
> Subject: Oracle RAW Datatype
> 
> 
> > I have an existing Oracle 9i table that has several RAW columns
> > defined.  I noticed that Torque converts 'BINARY' types declared in the
> > schema file to 'LONG RAW'.  This doesn't work for me because the RAW
> > columns have indexes on them.  Before I simply try reading the table
> > with what Torque generates, has anyone faced this issue before?  Perhaps
> > Torque will read the columns declared as RAW without a problem?
> >
> > Thanks.
> >
> > --
> > "All motion is not progress, and all movement is not forward" (anon)
> > Key ID:  F0533BB6
> > Finger Print:  7F07 D9CD 266F 29D4 3616  164D F055 6E4C F053 3BB6
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-user-help@db.apache.org
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
-- 
"All motion is not progress, and all movement is not forward" (anon)
Key ID:  F0533BB6
Finger Print:  7F07 D9CD 266F 29D4 3616  164D F055 6E4C F053 3BB6



Re: Oracle RAW Datatype

Posted by Robert Morse <rm...@mdesignz.com>.
Thank you Bill!
I'm trying it now...I hope you're right!  

-robert.

On Wed, 2003-02-12 at 06:32, Bill Schneider wrote:
> Haven't tried this but I imagine that from Torque's perspective (JDBC +
> Village), RAW and LONG RAW are handled equivalently. In both cases,
> PreparedStatement.setBytes and ResultSet.setBytes should take/return a
> byte[].  The distinction between the two may only be important in the
> database itself.
> 
> -- Bill
> ----- Original Message -----
> From: "Robert Morse" <rm...@mdesignz.com>
> To: <to...@db.apache.org>
> Sent: Wednesday, February 12, 2003 9:04 AM
> Subject: Oracle RAW Datatype
> 
> 
> > I have an existing Oracle 9i table that has several RAW columns
> > defined.  I noticed that Torque converts 'BINARY' types declared in the
> > schema file to 'LONG RAW'.  This doesn't work for me because the RAW
> > columns have indexes on them.  Before I simply try reading the table
> > with what Torque generates, has anyone faced this issue before?  Perhaps
> > Torque will read the columns declared as RAW without a problem?
> >
> > Thanks.
> >
> > --
> > "All motion is not progress, and all movement is not forward" (anon)
> > Key ID:  F0533BB6
> > Finger Print:  7F07 D9CD 266F 29D4 3616  164D F055 6E4C F053 3BB6
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-user-help@db.apache.org
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
-- 
"All motion is not progress, and all movement is not forward" (anon)
Key ID:  F0533BB6
Finger Print:  7F07 D9CD 266F 29D4 3616  164D F055 6E4C F053 3BB6



Re: Oracle RAW Datatype

Posted by Bill Schneider <bs...@vecna.com>.
Haven't tried this but I imagine that from Torque's perspective (JDBC +
Village), RAW and LONG RAW are handled equivalently. In both cases,
PreparedStatement.setBytes and ResultSet.setBytes should take/return a
byte[].  The distinction between the two may only be important in the
database itself.

-- Bill
----- Original Message -----
From: "Robert Morse" <rm...@mdesignz.com>
To: <to...@db.apache.org>
Sent: Wednesday, February 12, 2003 9:04 AM
Subject: Oracle RAW Datatype


> I have an existing Oracle 9i table that has several RAW columns
> defined.  I noticed that Torque converts 'BINARY' types declared in the
> schema file to 'LONG RAW'.  This doesn't work for me because the RAW
> columns have indexes on them.  Before I simply try reading the table
> with what Torque generates, has anyone faced this issue before?  Perhaps
> Torque will read the columns declared as RAW without a problem?
>
> Thanks.
>
> --
> "All motion is not progress, and all movement is not forward" (anon)
> Key ID:  F0533BB6
> Finger Print:  7F07 D9CD 266F 29D4 3616  164D F055 6E4C F053 3BB6
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>