Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: inserting an array into a LONG RAW field using proC???

Re: inserting an array into a LONG RAW field using proC???

From: <mpir_at_compuserve.com>
Date: 1998/03/05
Message-ID: <6dmgc4$r12$1@nnrp1.dejanews.com>#1/1

In article <34fdb29f.1136524706_at_news.total.net>,   asavard_at_infomar.com (Alexandre Savard) wrote:
>
> Hi,
>
> I need to insert all the information contained in an array in a long
> raw field. The data structure goes like :
> struct data
> { double dU;
> double dV;
> } myStruct
>
> MyStruct MyArray[175][250];
>
> Now, i'm using ProC and I need to store all the cells of my array into
> one row. How should I do???
>
> Thanks
>
> -----------
> Alexandre Savard
> Infomar Marine Services
> asavard_at_infomar.com
>
> "Day after day, grain after grain,
> The sand slips through your fingers,
> While you uselessly try to stop it.
> Meanwhile, You don't realize,
> That behind your back, still shines the sun."
>

consider setting mystruct to the 175 array, then equating myarray to an Oracle long raw

here is a snippet that is a combo of my code and Oracles from the book:

/* This is the definition of the long raw structure.
 * Note that the first field, len, is a long instead
 * of a short.  This is because the first 4
 * bytes contain the length, not the first 2 bytes.
 */

typedef struct
{

    long len;
    unsigned char buf[1048576];
} long_raw;

/* Type Equivalence long_varraw to long varraw.
 * All variables of type long_varraw from this point
 * on in the file will have external type 95 (long varraw)
 * associated with them.

*/
EXEC SQL type long_raw is long raw (1048576);

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Thu Mar 05 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US