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

Home -> Community -> Mailing Lists -> Oracle-L -> File Upload and Download via IAS

File Upload and Download via IAS

From: MacGregor, Ian A. <ian_at_SLAC.Stanford.EDU>
Date: Wed, 05 Sep 2001 17:47:23 -0700
Message-ID: <F001.00384173.20010905175609@fatcity.com>

I am testing the implementation detailed by note 113471.1 on Metalink part of the directions are to create a table ...

CREATE TABLE documents (

          NAME VARCHAR2(256) NOT NULL,
          MIME_TYPE VARCHAR2(128) NULL,
          DOC_SIZE NUMBER NULL,
          DAD_CHARSET VARCHAR2(128) NULL,
          LAST_UPDATED DATE NULL,
          CONTENT_TYPE VARCHAR2(128) NULL,
          CONTENT LONG RAW NULL,
          BLOB_CONTENT BLOB

  )

I have done this adjusted the DAD and successfully uploaded the file. I would however like to add an owner column to the table and implement fine-grained security. I cannot figure out how the insert statement is built. The upload procedure looks like

PROCEDURE upload(name IN owa.vc_arr) IS

   /* This procedure can upload both one single file as well as multiple files.

      The actual upload is done by the listener. You simply initialize the process 
      by providing the file to be uploaded. */
   i BINARY_INTEGER := 0;
   BEGIN
    LOOP
     i := i + 1;
     IF name(i) IS NOT NULL THEN
      htp.p(name(i)||' uploaded');
      htp.br;
     ELSE
      NULL;
     END IF;

    END LOOP;
   EXCEPTION
    WHEN NO_DATA_FOUND THEN
     NULL;
    WHEN OTHERS THEN
     htp.p(sqlerrm);
    RETURN;
   END; There isn't an insert satement in the entire package. But somehow the following statement is created

INSERT INTO testuser.testdocs (NAME, MIME_TYPE, CONTENT_TYPE, DAD_CHARSET, LAST_UPDATED, BLOB_CON
TENT) VALUES (:docname,:mimetype,:content_type,:charset, TO_DATE(:last_updated,'Dy
, DD Mon YYYY HH24:MI:SS "GMT"'),:content) RETURNING NAME into :new_docname

Where does it come from???

Ian MacGregor
Stanford Linear Accelerator Center
ian_at_slac.stanford.edu  

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: MacGregor, Ian A.
  INET: ian_at_SLAC.Stanford.EDU

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Sep 05 2001 - 19:47:23 CDT

Original text of this message

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