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 -> How do I submit a file to a field?

How do I submit a file to a field?

From: Herlitz, Kirk (EXCHANGE:RICH2:2K29) <kherlitz_at_americasm01.nt.com>
Date: Thu, 05 Aug 1999 18:02:52 -0500
Message-ID: <37AA181C.3CB5DD97@americasm01.nt.com>


What I need to do is submit a local file to be stored in a field. The column that the field is in is declared as a LONG type, so it can fit varied sizes of files.

I'm using Oracle v7.3.3.

I'm eventually going to be submitting files to this database via JDBC. Right now, however, I'm just trying to get it to work via SQL*PLUS and/or PL/SQL.

Here's what I've tried:

Wrote a small PL/SQL file that is intended to submit the file to a field in a pre-existing row when it is executed:

BEGIN
  UPDATE CRIMSON SET CALLTRAK_FILE = 'insert content of   file here' WHERE CONTEXT = 'AX';
END;
/

As I mentioned the CALLTRAK_FILE column is defined as LONG, yet I still get the following error everytime I try to run this script:

ERROR at line 1:
ORA-01704: string literal too long
ORA-06512: at line 2

What I want to do seems very simple, yet I can't seem to find a simple way to do it. I don't want to use SQL* Loader because this application is going to be deployed to a lot of machines that don't have Oracle and will be accessing it remotely. Therefore, it's just an added hassle to try to do some kind of funky client/server thing using sockets.

I don't have much experience at all w/ Oracle or SQL, so I wanted to find out if there's an easy way to do what I want to do. It seems like there should be, so I thougt I'd ask some people with more experience than I have.

Any information would be greatly appreciated!

Thanks,

Kirk Received on Thu Aug 05 1999 - 18:02:52 CDT

Original text of this message

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