How to store a pdf file in a table

Hi
In my project i have to store a pdf
file in the table column.
can anyone tell what wil be the column type
while creating the table in oracle 7.3.4
Thanks
Alok

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Alok Hota ([email protected]):
Hi
In my project i have to store a pdf
file in the table column.
can anyone tell what wil be the column type
while creating the table in oracle 7.3.4
Thanks
Alok<HR></BLOCKQUOTE>
Since you have to store a binary file you
can use LONG RAW.
Thorsten

Similar Messages

  • How to store a pdf file  in a table field.

    Hi,
    I need to store the file in a table field..How we can do this.The file format is pdf..I stored this in application server also..

    during my tries to adapt this code to my needs, following error occured during compilation of the procedure:
    PLS-00201: identifier 'IMAGES.MIME_TYPE' must be declared
    here is my procedure:
    CREATE OR REPLACE PROCEDURE load_file( file_name VARCHAR2 )
    AS file_lob BFILE;
    binary_lob BLOB;
    mime_type images.mime_type%TYPE;
    extension_pos NUMBER;
    BEGIN
    --Use the extension of the file name to determing the MIME-type 
    --The MIME-type for a .pdf file will be application/pdf
    extension_pos := INSTR( file_name, '.' );
    mime_type := 'application/' || SUBSTR( file_name,extension_pos + 1,LENGTH( file_name ) );
    -- Insert a new row into the images table. Get the LOB locator
    -- for the newly inserted row
    -- we will be using that to insert
    -- the content from the file.
    INSERT INTO TESTBLOB( blobid, filename, mime_type, content )
    VALUES( 1, file_name, mime_type, EMPTY_BLOB() )
    RETURNING content INTO binary_lob;
    -- Open up the file in the IMAGES directory named file_name,
    -- load that file into the newly created LOB locator, and
    -- close the file
    file_lob := BFILENAME( 'TESTDIRECTORY', file_name );
    dbms_lob.fileOpen ( file_lob, dbms_lob.file_readOnly );
    dbms_lob.loadFromFile( binary_lob,file_lob,dbms_lob.getLength( file_lob ) );
    dbms_lob.fileClose ( file_lob );
    END;
    how do I have to adjust the declaration of the mime_type variable respectively what does images.mime_type%TYPE mean?
    katharina

  • How to store the zip file in oracle table?

    hi,
    How to store the zip file in oracle table ?
    is it possible to unzip and read the file ?
    Thanks
    Rangan S

    SQL> DESC BLOB_TABLE;
    Name Type Nullable Default Comments
    A INTEGER Y
    B BLOB Y
    SQL> INSERT INTO BLOB_TABLE VALUES(5,BLOB('MWDIR_TST','TEST.ZIP'));
    INSERT INTO BLOB_TABLE VALUES(5,BLOB('MWDIR_TST','TEST.ZIP'))
    ORA-00904: "BLOB": invalid identifier
    SQL> INSERT INTO BLOB_TABLE VALUES(5,('MWDIR_TST','TEST.ZIP'));
    INSERT INTO BLOB_TABLE VALUES(5,('MWDIR_TST','TEST.ZIP'))
    ORA-00907: missing right parenthesis
    SQL> INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'));
    INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'))
    ORA-01465: invalid hex number
    SQL> INSERT INTO BLOB_TABLE VALUES(5,('\\MWDIR_TST\TEST.ZIP'));

  • How to store the pdf file

    hi all,
    i need a pl/sql code to store the pdf file into the oracle database using blob.
    help me.
    Thanks in advance

    rabbott wrote:
    My first question is "where is the PDF file located"? If the answer is "on a file system accessible to the Oracle database" Then you can use directory objects and the DBMS_LOB package. It would look something like this:
    as SYS user do:
    -- assume the PDF files are in /data/documents <font face="tahoma,verdana,sans-serif" size="1" color="#000">files</font>ystem directory
    create or replace directory pdfdir as '/data/documents';
    grant read on directory pdfdir to <USER>;
    as USER do:
    create table mydocs (id integer primary key, doc blob);
    declare
    bf bfile;
    b blob;
    src_offset integer := 1;
    dest_offset integer := 1;
    begin
    -- insert a new blob and return it to local variable
    insert into mydocs values(1, empty_blob()) returning doc into b;
    -- open the bfile for file "summary.pdf"
    bf := bfilename('PDFDIR', 'summary.pdf');
    dbms_lob.loadBlobFromFile(b, bf, dbms_lob.lobmaxsize, dest_offset, src_offset);
    -- done
    commit;
    end;
    /I have the issue which is similar to what you have faced, I'll follow what you said to take a try, Thanks a lot!

  • How to store a bitmap file in the table

    i am using oracle 8i. i dont know how to save the bitmap file in the table, is long raw datatype should be used.
    thanks

    try to use the datatype of that feild as longraw...
    if u need more help then ask..
    tariq.

  • How to insert a pdf file from a dynamic location into a table

    Hi friends
    Can any one please let me know how to insert a pdf file into a table from a dynamic location in server.
    suppose say i have a table CUST_BLOB(file_name, file_data). I have a file in directory c:\local having file_name test.pdf
    I want to insert this file in CUST_BLOB. Please help me.
    Thanks in advance.
    --Ahmed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    user620950 wrote:
    Hi friends
    Can any one please let me know how to insert a pdf file into a table from a dynamic location in server. Why dynamic locations on the server?
    Make it a business case that the files should be stored in specific location(s).
    Oracle uses directory objects to point to locations on the file system and, whilst these locations can be altered, it is better practice to set up specific locations and grant permission to the correct users for those locations so that there is full control over who is accessing what on the server. Whilst filenames may be dynamic, I wouldn't recommend using dynamic locations.

  • How to store PDF files in a table

    Hi,
    Is there a way to store PDF files in a table? Do I use LOB? How do I automatically read them if I want them to be available in a web site?
    Thanks.
    Camille

    U have to use either BLOBs (internal LOBs) or BFILEs (external LOBs). check out docu. at http://www.akadia.com/services/ora_blob.html

  • How to use the function module which i mentioned, to store the pdf files

    hi,
    SO_NEW_DOCUMENT_ATT_SEND_API1
    I am using above function module to send employ details through mail in pdf format, if i want to store that pdf files in a local computer too, then how should i catch hold off those individual pdf files of all employees, plz help me out with a sample code

    hey iam from functional side can u be little bit clear of that feature
    thanks
    sikindar

  • How do i store a pdf file on the ipad?

    how do i store a pdf file on the ipad?

    There is the free iBooks app which lets you save PDFs (you can copy PDFs either via the Books part of your iTunes library or the 'open in' option in Mail), or there are paid apps such as GoodReader

  • How do I transfer PDF files from iPad to MacBook Pro

    hi there,
    ccan someone please help with this as I want to upgrade my iPad and want to store on PDF files onto my MacBook Pro so I can then download them onto my new iPad.
    thanks

    You can use the desktop version of iTunes app to transfer PDF files between your iPad and MacBook Pro.
    Please take a look at the following FAQ document.
    How to backup and restore PDF documents on your iPad/iPhone using iTunes
    Please let us know if you have any questions about the steps that are described in the document.
    Alternatively, if you use Acrobat.com (cloud storage), you can upload/save all of your PDF files on Acrobat.com and access them from your new iPad.

  • How to transfer my PDF files from computer to iphone 5s

    How to transfer my PDF files from my laptop to my iPhones 5 s and how to make folder to store those files?

    The iphone does not have a file system to create a folder in, instead apps themselves are responsible for storing their files,
    Use an app like ibooks or acrobat reader.
    You can then transfer the files via itunes or email them and then use the open in... option and select your chosen app.
    They will then be stored within that app.

  • How to Upload a PDF file into BLOB column in a table using Forms 9i

    Can anyone tell me how to upload a PDF file from client system using File dialog window and store its content in BLOB column in a table. The file to be uploaded will be in client side.

    Hi,
    please, search a bit on the forum before do a question:
    Just searching by "upload blob pdf" ...
    How to batch upload PDF files into database BLOB
    Regards,
    Jose.

  • How to Upload a PDF file into BLOB column in a table using Forms 6i

    Can anyone tell me how to upload a PDF file from client and store its content in BLOB column in a table. The file will be genered using reports and win be stored in db.The file to be uploaded will be in client side.
    Thank´s.

    If you are using version 9 or 10 use webutil.... Look in webutil.pll.
    Use either one these two fuctions...
    FUNCTION Client_To_DB( clientFile       in VARCHAR2,
                             tableName        in VARCHAR2,
                             columnName       in VARCHAR2,
                             whereClause      in VARCHAR2,
                             asynchronous     in BOOLEAN default FALSE,
                             callbackTrigger  in VARCHAR2 default NULL) return BOOLEAN;
      FUNCTION Client_To_DB_With_Progress
                         (   clientFile       in VARCHAR2,
                             tableName        in VARCHAR2,
                             columnName       in VARCHAR2,
                             whereClause      in VARCHAR2,
                             progressTitle    in VARCHAR2,
                             progressSubTitle in VARCHAR2,
                             asynchronous     in BOOLEAN default FALSE,
                             callbackTrigger  in VARCHAR2 default NULL) return BOOLEAN;

  • How to avoid the pdf file in browser cache

    i am opening pdf files through browser. After that same pdf changed their contents . after i open the pdf but it will not updated. Bcoz this file in cache . so how to avoid the cache store for pdf files.
    plz help me!!!

    the code is as bellow
    File fBlob = new File ("test.pdf");
    FileInputStream fIS = new FileInputStream(fBlob);
    pstUpdate= con.prepareStatement("UPDATE table set file = ? where id = ?");
    pstUpdate.setBinaryStream(1, fIS, (int) fBlob.length());
    pstUpdate.setString(2, rs.getString("id"));
    pstUpdate.execute();
    con.commit();

  • How do I convert à PDF file into my dairy?

    How do I convert à PDF file into my dairy?

    If I understand whatnyounare asking (and not sure I do), you may have a difficult time accomplishing that. Calendar app doesn't store documents and I don 't know of an app that will extract text from a PDF and place it in a calendar entry automatically. Check the app store - I could be wrong - but you will have to handle that manually.
    Many apps that read PDF will allow you to copy text, including GoodReader mentioned above.

Maybe you are looking for