Re: Loading long fields

From: Bhalchandra Ghatate <bhala_at_cs.utexas.edu>
Date: 22 Jun 1993 09:19:03 -0500
Message-ID: <m2e56nINNp0h_at_cash.cs.utexas.edu>


In article <1993Jun17.163811.1_at_urc.tue.nl> rcivan_at_urc.tue.nl writes:
>Hello,
>
>In loading a table I would like to insert te contents of ASCII-files
>as field values of a field of type LONG.
>The average file size is about 5-6 KB.
>All I tried failed.
>I would be glad to know whether anyone has solved the problem of loading
>LONG fields.
>Thanks in advance.
>
> Ivan

        If you are using the OCI interface the easiest way is to to bind a variable in the SQL statement to the address of your LONG data.

        This can be done using the "obndrv" or the "obndrn" function calls.

You can load the files into a buffer say buf[6000]. Then if your sql statement is

        insert into temp values ( :data)
call the function

        obndrv(cursor,":data",-1,buf,length,8,....) Where the cursor is your cursor and length is the amount of data you want to put in.

bhala Received on Tue Jun 22 1993 - 16:19:03 CEST

Original text of this message