Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2005
    Posts
    36

    Unanswered: create procedure

    IT IS VERY IMPORTANT, I HAVE THIS CODE:

    CREATE OR REPLACE DIRECTORY DIRECTORIO AS 'C:\DIRECTORIO\'


    CREATE OR REPLACE PROCEDURE agregaEsquema (directorio IN varchar2,identificador IN varchar2,nombre IN varchar2,scr IN varchar2, exten IN varchar2, document IN varchar2,fecha IN Date, autor IN varchar2, usuario IN varchar2, contraseña IN varchar2) as
    sc clob;
    sc_file bfile;
    ex blob;
    ex_file bfile;
    dc clob;
    dc_file bfile;
    BEGIN
    sc_file := bfilename(directorio, scr);
    ex_file := bfilename(directorio, exten);
    dc_file := bfilename(directorio, document);

    INSERT INTO ESQ_BD VALUES (identificador, nombre, empty_clob(),empty_blob(),empty_clob(),fecha,autor ,usuario,contraseña)
    RETURNING Script, Extensional, Docum into sc, ex, dc;

    dbms_lob.fileopen(sc_file,dbms_lob.file_readonly);
    dbms_lob.fileopen(ex_file,dbms_lob.file_readonly);
    dbms_lob.fileopen(dc_file,dbms_lob.file_readonly);


    dbms_lob.loadfromfile( sc, sc_file, dbms_lob.getlength (sc_file) );
    dbms_lob.loadfromfile( ex, ex_file, dbms_lob.getlength (ex_file) );
    dbms_lob.loadfromfile( dc, dc_file, dbms_lob.getlength (dc_file) );


    dbms_lob.fileclose(sc_file);
    dbms_lob.fileclose(ex_file);
    dbms_lob.fileclose(dc_file);
    commit;
    END;



    AND WHEN I RUN IT, THE ERROR IS:

    ORA-22288: FILE OR LOB OPERATION FAILED.SYSTEM CAN'T FIND THE FILE ESPECIFIED. ORA-06512: en "SYS.DBMS_LOB", líine 504 ORA-06512: en "SYSTEM.AGREGAESQUEMA", line 18 ORA-06512: in line 1



    Do you see any possible error?Please help mi! thanks

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Have you searched http://asktom.oracle.com as the STICKY note suggests?
    There you will find many functioning code examples.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •