in reply to Re: DBD::Oracle - RAW datatypes
in thread DBD::Oracle - RAW datatypes

<html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> </head> <body> Thanks for your response. The Oracle documentation states that RAW datatypes can be up to 2KB
in size. The .GIF's I'm trying to insert are:

IPP_0002.GIF 1518b
IPP_0003.GIF 899b
IPP_0004.GIF 895b
IPP_0005.GIF 255b
IPP_0012.GIF 1265b
IPP_0015.GIF 902b

When I select them out of the database and write them to my cwd, I get:

IPP_0002.GIF 3036b
IPP_0003.GIF 1798b
IPP_0004.GIF 1790b
IPP_0005.GIF 510b
IPP_0012.GIF 2530b
IPP_0015.GIF 1804b

The gif's aren't being truncated, they're expanding!... ?

I can successfully insert/select BLOB's, CLOB's, LONG's. But I also need to be able to do
RAW's. I work in a test environment and my current task is to provide test cases for all of the
datatypes for the product my company is working on...

</body> </html>

Replies are listed 'Best First'.
Re: Re: Re: DBD::Oracle - RAW datatypes
by cjensen (Sexton) on Oct 19, 2001 at 21:02 UTC
    Oh, that's weird. You're getting exactly double the number of bytes. What does your table definition look like? Do you have more than one binary object in the table? Have you tried using bind_param_inout and specifying ora_field along with ora_type?

      </head> <body> The table has 3 columns:

      VARCHAR2(20)
      NUMBER(10)
      RAW(2000)

      I inserted 6 rows, so there are 6 RAW's in the table when I do my select - 1 RAW per row...

      I haven't tried using bind_param_inout or ora_field. BTW - what exactly does ora_field refer to? The column name?...

      </body> </html>
        Yes, ora_field is the column name.