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

Home -> Community -> Usenet -> c.d.o.server -> Re: Removing Apostraphes From Uploaded Attachment Files

Re: Removing Apostraphes From Uploaded Attachment Files

From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 29 Aug 2005 15:12:22 -0700
Message-ID: <1125353492.663652@yasure>


redrobot5050_at_gmail.com wrote:
> Hi all,
>
> I'm having a problem with an Oracle Web Application written using the
> PL/SQL cartridge (mod_pl) and Oracle 9i as a backend. As part of the
> application, we are uploading files into the database. For handling
> upload and download of files, we are using the Oracle package:
> wpg_docload (.download_file and upload_file, respectively).
>
> Our problem: When the file name of the uploaded document contains an
> apostraphe/single quote ( ' ) the program seems to choke, and produces
> an oracle error. We think the apostraphe/single quote is escaping the
> Oracle generated SQL statement. Is there some way that we can strip out
> this apostraphe from the file name before the file is inserted into the
> database?
>
> I have tried using a before insert trigger, however, the oracle
> attachments table contains a long raw, and so cannot be used in
> row-level triggers.
>
> Thanks for any help / advice!

Use REPLACE to double the apostrophe's

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Mon Aug 29 2005 - 17:12:22 CDT

Original text of this message

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