Pictures stored as LONG RAW

From: Max Busch <tds_at_indigo.ie>
Date: 21 Jun 1998 18:32:59 GMT
Message-ID: <01bd9d42$76901b80$7f867dc2_at_max>



Hi,

I'm using Pro*C with Oracle 7.3 under Win 95 and NT. My application needs to read and store pictures in a database. The database is also being accessed through Forms 4.5 which stores the pictures as LONG RAW. I have 2 problems:

Problem 1:

I can't access the LONG RAW field. For testing, I declared

EXEC SQL BEGIN DECLARE SECTION; typedef struct {

   char data [0x80000]; /* That's 1/2 MB */ } GRAPHICS; EXEC SQL END DECLARE SECTION; EXEC SQL TYPE GRAPHICS IS LONG RAW (0x80000);

A select statement into a variable of type GRAPHICS yields -2 in the corresponding indicator variable, which, according to the manual, means "Oracle assigned a truncated column variable to the host variable, but the original column value could not be determined (a LONG column, for example)." I checked the contents of the GRAPHICS variable by first mem-setting it to 0xFF and then dumping it to a file after the select statement. It remained completely unchanged. The pictures are passport size photographs which, even in 24-bit color, should be less than 1/2 MB.

I'm really confused here. What good is a column type (LONG, LONG RAW) whose value you cannot determine. You can't even determine the size of this column. The VSIZE () function doesn't work. Neither does RAWTOHEX (). Declaring GRAPHICS as LONG VARRAW (0x7FFFC) doesn't work either but yields an Oracle error in the select statement.

No doubt, at this stage, someone is laughing about what I'm trying to do. I must be missing something fundamental. If you know, I'd very much like to hear from you...

Problem 2:

Even if I get the data out of the LONG RAW column, I still don't know what format it's in. According to the manual, Forms 4.5 stores pictures (bitmaps) in a proprietary format, but it gives no further details. Does anyone know?

Thanks,
Max. Received on Sun Jun 21 1998 - 20:32:59 CEST

Original text of this message