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
[EMAIL PROTECTED]


 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: MacGregor, Ian A.
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to