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: cannot fetch data from table just after inserting by file upload

Re: cannot fetch data from table just after inserting by file upload

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 15 Nov 1999 11:22:24 -0500
Message-ID: <CTMwOCc1D58ZuvB2TNs30OW4OCr5@4ax.com>


A copy of this was sent to Roland Baier <rbaier_at_gwdg.de> (if that email address didn't require changing) On Mon, 15 Nov 1999 16:11:52 +0100, you wrote:

>Hello
>
>in one of our applications, we are using Thomas Kyte's OWA replacement
>cartridge to perform uploads of PDF-files into the file system.
>Now, we are going to migrate to Oracle 8.04 (and then 8.1.5i) and OAS
>4.07 and try to do without the OWARepl, but ...
>
>File uploads with OAS 4.07 unchangably go to the OAS content table
>(OWS_CONTENT) in the WEBSYS schema and are stored in the column CONTENT
>of datatype LONG RAW.
>To unload them from there into a file, i use a C-program (derived from
>the sample code in Metalink Doc. No. 50759.1, from the function
>"fetch_into_file" mainly) which will be called from the PL/SQL procedure
>processing the data from the upload form (so, whenever some application
>user uploads a file to the database, it should instantly be unloaded and
>stored in the file system).
>This C-program does not work when called up to operate on the freshly
>uploaded data (that's what we want it to do). It DOES work, if it is
>called with parameters for unloading a previously existing row (not the
>one just created by the file upload). It DOES work, if at first only the
>upload is allowed to take place, and the unload procedure is called
>later manually. It seems like there had to elapse some time after the
>file upload before the uploaded data can be retrieved?
>
>In the C-program, the following OCI functions all return OCI_SUCCESS:
> OCIHandleAlloc
> OCIStmtPrepare
> OCIBindByPos
> OCIStmtExecute
> OCIDefineByPos
>before
> OCIStmtFetch
>returns OCI_NO_DATA
>
>Could anyone give me a hint what's going wrong here?
>

commit BEFORE you call the C program. The upload is not committed by the OAS until

If you commit, you'll be able to unload.

>Thanks in advance
>Roland Baier
>
>
>-----------------------------------------------GWDG-----------------
>Gesellschaft fuer wissenschaftliche Datenverarbeitung mbH Goettingen
> Am Fassberg, 37077 Goettingen Fax: 0551/21119
>--------------------------------------------------------------------
>Dr. Roland Baier Tel.: +49 551/201-1822 email: rbaier_at_gwdg.de

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Mon Nov 15 1999 - 10:22:24 CST

Original text of this message

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