Saving a PDF or DOC file into Oracle 9i using Developer Forms 10g

Hi guys,
I want to save a pdf or doc file into oracle 9i. I am using Developer 10 g. Please help me;
1. What datatype field should be in database table to store such file.
2. Which code should I use in Forms 10g to display open file dialog, get the name and save that into database table.
Thanks in advance

WEBUTIL is a library used with forms to interact with the client. With Forms10G the library comes shipped with the developer suite, for forms 9i i'm not sure, check the forms-page at otn if there is any download available. For documentation about how to do a file-upload, simply search the forum, there are lots of examples.

Similar Messages

  • How To Store pdf or doc file in Oracle Database using Java Jdbc?

    can any one help me out How To Store pdf or doc file in Oracle Database using Java Jdbc in JSP/Serlet? i tried like anything. using blob also i tried. but i am able 2 store images in DB not files. please if u know or else if u have some code like this plz send that to me, and help me out plz. i need that urgent.

    Hi.. i am not getting error, But i am not getting the original contents from my file. i am getting all ASCII vales, instead of my original data. here i am including my code.
    for Adding PDF in DB i used image.jsp
    Database table structure (table name. pictures )
    Name Null? Type
    ID NOT NULL NUMBER(11)
    IMAGE BLOB
    <%@ page language="java" import="java.util.*,java.sql.*,java.io.*" pageEncoding="ISO-8859-1"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%
    try{
         Class.forName("oracle.jdbc.driver.OracleDriver");
         Connection con=DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.135:1521:orcl","scott","tiger");
         PreparedStatement ps,pstmt,psmnt;
         ps = con.prepareStatement("INSERT INTO pictures VALUES(?,?)");
    File file =
    new File("D:/info.pdf");
    FileInputStream fs = new FileInputStream(file);
    ps.setInt(1,4);
    ps.setBinaryStream(2,fs,fs.available());
    int i = ps.executeUpdate();
    if(i!=0){
    out.println("<h2>PDF inserted successfully");
    else{
    out.println("<h2>Problem in image insertion");
    catch(Exception e){
    out.println("<h2>Failed Due To "+e);
    %>
    O/P: PDF inserted successfully
    i tried to display that pdf using servlet. i am giving the code below.
    import java.io.IOException;
    import java.sql.*;
    import java.io.*;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class DispPDF extends HttpServlet {
         * The doGet method of the servlet. <br>
         * This method is called when a form has its tag value method equals to get.
         * @param request the request send by the client to the server
         * @param response the response send by the server to the client
         * @throws ServletException if an error occurred
         * @throws IOException if an error occurred
         public void service(HttpServletRequest request, HttpServletResponse response)
                   throws ServletException, IOException {
              //response.setContentType("text/html"); i commented. coz we cant use response two times.
              //PrintWriter out = response.getWriter();
              try{
                   InputStream sPdf;
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                        Connection con=DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.135:1521:orcl","scott","tiger");
                        PreparedStatement ps,pstmt,psmnt;
                   psmnt = con.prepareStatement("SELECT image FROM pictures WHERE id = ?");
                        psmnt.setString(1, "4"); // here integer number '4' is image id from the table.
                   ResultSet rs = psmnt.executeQuery();
                        if(rs.next()) {
                   byte[] bytearray = new byte[1048576];
                        //out.println(bytearray);
                        int size=0;
                        sPdf = rs.getBinaryStream(1);
                        response.reset();
                        response.setContentType("application/pdf");
                        while((size=sPdf.read(bytearray))!= -1 ){
                        //out.println(size);
                        response.getOutputStream().write(bytearray,0,size);
                   catch(Exception e){
                   System.out.println("Failed Due To "+e);
                        //out.println("<h2>Failed Due To "+e);
              //out.close();
    OP
    PDF-1.4 %âãÏÓ 2 0 obj <>stream xœ+är á26S°00SIá2PÐ5´1ôÝ BÒ¸4Ü2‹ŠKüsSŠSŠS4C²€ê P”kø$V㙂GÒU×713CkW )(Ü endstream endobj 4 0 obj <>>>/MediaBox[0 0 595 842]>> endobj 1 0 obj <> endobj 3 0 obj <> endobj 5 0 obj <> endobj 6 0 obj <> endobj xref 0 7 0000000000 65535 f 0000000325 00000 n 0000000015 00000 n 0000000413 00000 n 0000000168 00000 n 0000000464 00000 n 0000000509 00000 n trailer <<01b2fa8b70ac262bfa939cc786f8770c>]/Root 5 0 R/Size 7/Info 6 0 R>> startxref 641 %%EOF
    plz help me out.

  • How do i import pdf or doc file into ppt?

    how do i import pdf or doc file into ppt?

    This forum is for questions related to https://workspaces.acrobat.com.
    Perhaps you would get a better answer in the Microsoft Powerpoint forum: http://answers.microsoft.com/en-us/office/forum/PowerPoint?auth=1

  • Help Required:How Upload Excel file Into Oracle Table Using PLSQL Procedure

    Please Help , Urgent Help Needed.
    Requirement is to Upload Excel file Into Oracle Table Using PLSQL Procedure/Package.
    Case's are :
    1. Excel File is On Users/ Client PC.
    2. Application is on Remote Server(Oracle Forms D2k).
    3. User Is Using Application Using Terminal Server LogIn.
    4. So If User Will Use to GET_FILE_NAME() function of D2K to Get Excel File , D2k Will Try to pick File from That Remote Server(Bcs User Logind from Terminal Server Option).
    5. Cannot Use Util_File Package Or Oracle Directory to Place That File on Server.
    6. we are Using Oracle 8.7
    So Need Some PL/SQL Package or Fuction/ Procedure to Upload Excel file on User's Pc to Oracle Table.
    Please Guide me wd some Code. or with Some Pl/SQL Package, or With SOme Hint. Or any Link ....
    Jus help to Sort This Issue ........
    you can also write me on :
    [email protected], [email protected]

    TEXT_IO is a PL/SQL package available only in Forms (you'll want to post in the Forms forum for more information). It is not available in a stored procedure in the database (where the equivalent package is UTL_FILE).
    If the Terminal Server machine and the database machine do not have access to the file system on the client machine, no application running on either machine will have access to the file. Barring exceptional setups (like the FTP server on the client machine), your applications are not going to have more access to the client machine than the operating system does.
    If you map the client drives from the Terminal Server box, there is the potential for your Forms application to access those files. If you want the files to be accessible to a stored procedure in the database, you'll need to move the files somewhere the database can access them.
    Justin

  • Is it possible to import a .pdf or .doc file into DVD studio Pro 4?

    When I finally finish my 2D animation for my Senior Project and finally make the DVD, I want to include the short story that the animation is based on to the DVD. I want to import it as .pdf or a .doc into DVD Studio Pro 4. What I want to know is, is if this is possible, or if is not, is there another acceptable file format that I can use if .pdf or .doc isn't possible?
    Message was edited by: obisgirl

    Techincally you can create a link to take it to the file... but there are so many different software DVD players that it doesnt work with 90% of them so its pointless..
    as for including your files on the DVD....
    First make sure your files are all in one folder called DVD Content or something like that so they know its in that location
    then in DVDSP at the top where all the icons are...
    hit build and format.
    in the general tab you will see...
    Disc
    Source
    DVD-ROM Data
    destination
    under DVD-ROM Data check the content box.
    Choose the folder you have all your files in.
    joliet extension support doesnt really matter but i always click it so that windows can identify better what file format it is.
    then continue building and formating.
    let me know if that works or if you run into an issue.

  • Converting .pdf and .doc files into .txt file

    Can anyone here please tell me (a humble programmer) if there's anything in Java to help me accomplish the above, i.e. to strip the markup of these files.
    Or perhaps someone might know if there are programs already out there that can?
    Any pointers or advice would be great, thanks

    PDF: iText (www.lowagie.org or .com) and FOP (at apache.org, or maybe jakarta.apache.org) are the de facto standards for writing PDF in Java, but I don't think either of them will help you with reading it. You might check out etymon. I think that reads PDF. Or you could google for java pdf reader
    Doc: Check out POI, again at either jakarta or apache.

  • Upload Attachements(Doc File) into SAPand Read The same in BADI

    Hi All,
    I am Nagesh, and presently working on a BADI(NOTIF_EVENT_POST) for sending emails when a new Notification is created through QM01 Transaction Code, and its working very very fine. But now an additional requirement has come up, where i need to upload an Standard Format Word Document into SAP and then attach this file to the Mail to which the converted PDF Smartform file has been attached and then send both files in single mail to concerned Vendor. So I tried to upload the .Doc file into SAP by using OAER TCode with following Parameters
    Class name              :            PICTURES
    Class type               :            OT
    Object key               :            CAPA.
    I exactly dont know whether this is the right format or not, please help me, if this is possible or not.
    And also I uploaded the same doc file from application server to Presentation Server using Tcode CG3Z, to a ditectory which exists in SAP (Checked in AL11 Tcode). So the nhow to read that complete file to send the same as attachemnts without making any changes .
    Regards,
    Nagesh Kumar.
    Edited by: Nagesh Kumar on Mar 12, 2010 9:39 AM
    Edited by: Nagesh Kumar on Mar 12, 2010 11:32 AM

    Hi All,
    I am Nagesh, and presently working on a BADI(NOTIF_EVENT_POST) for sending emails when a new Notification is created through QM01 Transaction Code, and its working very very fine. But now an additional requirement has come up, where i need to upload an Standard Format Word Document into SAP and then attach this file to the Mail to which the converted PDF Smartform file has been attached and then send both files in single mail to concerned Vendor. So I tried to upload the .Doc file into SAP by using OAER TCode with following Parameters
    Class name              :            PICTURES
    Class type               :            OT
    Object key               :            CAPA.
    I exactly dont know whether this is the right format or not, please help me, if this is possible or not.
    And also I uploaded the same doc file from application server to Presentation Server using Tcode CG3Z, to a ditectory which exists in SAP (Checked in AL11 Tcode). So the nhow to read that complete file to send the same as attachemnts without making any changes .
    Regards,
    Nagesh Kumar.
    Edited by: Nagesh Kumar on Mar 12, 2010 9:39 AM
    Edited by: Nagesh Kumar on Mar 12, 2010 11:32 AM

  • Help Required :Excel Upload Into Oracle Table Using PLSQL Procedure/Package

    Please Help , Urgent Help Needed.
    Requirement is to Upload Excel file Into Oracle Table Using PLSQL Procedure/Package.
    Case's are :
    1. Excel File is On Users/ Client PC.
    2. Application is on Remote Server(Oracle Forms D2k).
    3. User Is Using Application Using Terminal Server LogIn.
    4. So If User Will Use to GET_FILE_NAME() function of D2K to Get Excel File , D2k Will Try to pick File from That Remote Server(Bcs User Logind from Terminal Server Option).
    5. Cannot Use Util_File Package Or Oracle Directory to Place That File on Server.
    6. we are Using Oracle 8.7
    So Need Some PL/SQL Package or Fuction/ Procedure to Upload Excel file on User's Pc to Oracle Table.
    Please Guide me wd some Code. or with Some Pl/SQL Package, or With SOme Hint. Or any Link ....
    Jus help to Sort This Issue ........
    you can also write me on :
    [email protected], [email protected]

    I also Tried to Use This
    But How can i Use SQLLDR Command In Stored Procedure.
    Well IN SQL*PlUS it is successfull but in Stored Procedure /Package ,PL/SQL does not recognise the OS commands.
    So now my Question How can I recognise the SQLLDR Commnad in Stored Procedure.

  • Error while inserting .doc file into CLOB object in oracle

    hello everybody ,
    i am trying to insert .doc file into clob column in oracle database.i am using oracle 8i. But i am getting error saying
    ORA-01461: can bind a LONG value only for insert into a LONG column
    i have no clue.
    i am pasting code here
    please help me out.
    regards
    darshan
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileReader;
    import java.io.Reader;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    public class InsertingClob {
    public static void main(String[] args) {
    File f = new File("E:\\dar
    sowres.doc");
    int len = (int) f.length();
    System.out.println(len);
    Connection conn = null;
    PreparedStatement ps = null;
    try {
    FileReader fr = new FileReader(f);
    String FILE_INSERT_QUERY = "INSERT INTO RESUMED VALUES(?,?)";
    conn = JDBCUtility.getConnection();
    ps = conn.prepareStatement(FILE_INSERT_QUERY);
    ps.setString(1,"1");
    ps.setCharacterStream(2,fr,len);
    int result = ps.executeUpdate();
    if(result ==1) {
    System.out.println("file has been successfully inserted into the db");;
    }else {
    System.out.println("not inserted");
    }catch (Exception e) {
    e.printStackTrace();
    and the error is
    java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
    at InsertBlob.main(InsertBlob.java:21)
    java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column

    You may have one of a few errors going for you there:
    The error says your column in Oracle is a Long not a CLOB, if it is, then make your column a CLOB.
    CLOB's are not suppored in all environments and/or all interfaces (specifically Windoz ODBC has a problem).
    I believe a DOC (Windoz MS-Word) file is a BLOB, due to formatting characters in the file.
    I had a very similar error using Access and trying to do this, but changing to SAS fixed the problem. It could very well be that your version of ODBC/JDBC drivers does not support it properly.

  • I created a new adobe account. I want to convert a doc file into pdf. How to do that?

    HI,
    I created a new adobe account. I want to convert a doc file into pdf. How to do that?
    I have seen a Create pdf menu and under that Convert office files to pdf. But I can't click it, why?
    How to convert my doc file to pdf?

    Hello,
    if you create your doc files by the help of WORD, you could use a Microsoft add on (it depends of your WORD Version).
    Hans-Günter

  • Insert doc file into report

    Hello all,
    I want to insert a .doc file into a report, I generate finally a .pdf document.
    I´ve tried two things:
    1.- Insert an OLE2 object (word document), but it doesn´t work, it is reported in the document 74902.1. Reports reservates the space but doesn´t insert the document.
    2.- Use a field "Link File", with a .doc documetn doesn´t work, the only option is to scan the text and insert as an image, but this is not a good option as I have to scan the file every time it changes and a .gif file is bigger than a .doc file.
    Thanks in advance.
    Vicent Aracil. Spain.

    Hi Vincent,
    Pl take a look at Note 166649.1 - it says -
    LIST OF PROBLEMS/LIMITATIONS
    1. Problem:
    Client/Server mode using OLE2 to read in a MS Word document will work as long
    as the output is sent to the previewer but will not work if DESTYPE is set to
    file. That is, an OLE object embedded in the report will display as an empty
    box or nothing at all when the report is generated to a PDF, HTML, or RTF file.
    Solution:
    This is because RTF, HTML and PDF formats do not support OLE.
    The summary is that you cannot embed an OLE object into PDF, and I guess there is no workaround as well to embed the Word document "dynamically" into Oracle Reports PDF output.
    Navneet.

  • Convert rtf, pdf or doc file to xml or html

    I'm using RichTextEditor from Flex, but I need to
    upload a .doc, .pdf or .rtf file into RichTextEditor. Or maybe a
    way to convert these files to xml or html.... please can you help
    me??

    Flex has no inherent functionality to do doc conversions. You
    are also looking for the ability to convert several different file
    types that might require seperate conversion methods. Also, it is
    important to note that Flex does not have very good HTMl
    functionality. In fact, it has a very limited subsed of HTML tags
    that are allowable and also require some distinct formatting
    requirements. So, if you are trying to convert PDF's and Docs, RTF
    etc, you might have a difficult time trying to get them to diosplay
    in the Flex RTE.
    I have struggled with trying to get a good PDF converter for
    multiple file types. Adobe does have some good server side
    utilities, but budget might be an issue.
    You can find several PDF converters that are server based
    that you migth be able to leverage.
    If you are CF user, Scorpio does have a better integration
    with PDF and LiveCycle services that may help when it is released.
    Good Luck.
    AL

  • Import DMP file into Oracle 8.1.5 on Windows 2000

    How to import DMP file into Oracle 8.1.5 database on Windows 2000 ?
    Please mention a coding example
    Thanks,
    Vivek Gupta

    Import has a lot of options, so it depends on what you want to do.
    C:\> imp help=y
    will show you all possible options. An example of full import :
    C:\> imp <username>/<password>@<TNS alias> file=<DMP file> full=y log=<LOG file>
    Message was edited by:
    Paul M.
    ...and there is always [url http://download-uk.oracle.com/docs/cd/F49540_01/DOC/index.htm]The documentation

  • Attach .pdf and .doc files to Reply emails.

    I am desperately trying to figure out how to attach .pdf and .doc files to Reply emails in the Mail app. I have downloaded GoodReader, but when I go into "Manage Files" and choose "Open in...", Mail is not one of the apps listed for me to choose from (only Quickoffice and iBooks are listed, that's it). My Gmail account is pushed to the Mail app, if that's relevant at all.
    I'm hoping to be able to attach documents to Reply emails in the Mail app, but if I have to do it using my web-based email, that's better than nothing. I just really need to be able to attach them to Replies, and not compose a new email from scratch.
    I'd REALLY appreciate any help with this!
    Thanks.

    I thought I might be able to figure out a clever work-around by using cut and paste from a new message but this did not work as expected. I have been using the MobileMe iDisk app to store pdf files and then just mailing out the links.  I believe my cut and paste method would have worked with this, however I've got about a year now to figure out another way to do this if it is not included in Apple's new cloud service. This has actually been a better as I need to worry less about file size and don't need to have the files stored on the device.
    You may want to look into what on-line file storage solutions are out there and if they have the ability to send links to files to colleagues, possibly with password protection.

  • Why is that saving as PDF increase the file sizes?

    Hola
    I've been notice that when I save a file as PDF, in CS5  it increase the file size to double that before.
    Even saving it with the same setting than before.
    For example, most of my Business Card file that I sent to print, use to be 1.5 or so megabytes
    Now if I open the same file, --or a new file-- and save it, it will increase it to double that size
    Any ideas?
    Thanks

    Hola and Thanks for your help
    Ok, I've been using Photoshop since version 6 or so (around year 2000)
    Just upgrade to CS5
    Before, for example, I'll make a file in PS, merge the layers, open a new file whit the same dimensions, resolution etc,
    and save this file as PDF to send to printers.
    Tthe file(s) that I have or were create them in CS4, than saved as PDFs have a file sizes of 1 to 2 megabytes as average.
    The NEW files (in the same sequence) that I create now, have an average of 3 Mbytes
    Even do, I save them with the same --I believe-- setting in PDF
    There's may be a new feature in PDF save dialogue box that I'm not getting?
    or, it just more information that it is put into?
    Thanks

Maybe you are looking for

  • Labview crashes every time I click on a broken arrow (vi has errors).

    I just upgraded Labview from 7 to 8.5.1 a few weeks ago.  Now, when I press the broken arrow to check the errors in a vi, Labview crashes.  This is a vi that was developed using the state diagram toolbox under Labview 7.  I now have the state chart t

  • Need to sort results in a report in descending order

    Hi, We have OIM 10g and we need to sort the report on date in descending order. I tried this code but still the column is not getting sorted. Evertime I generate the report, the results are sorted only in ascending order. Here the stored procedure co

  • IDoc message type cut off in WE02

    Hi, i have IDoc2IDoc Scenario. I already checked IDx1 and IDx2 for IDoc Metadata and in SXMB_MONI the Inbound IDoc looks like it should with right Basic and MessageType of the IDoc. But when i check WE02 in reciever system the Message type is cut. In

  • Where to Record Correspondence Notes on AR Customers

    Hi - We are reviewing FI-AR to see where we have legacy system functionality for what we call Customer Notes Maintenance.  Credit analysts record notes from their discussions with customers when making collection inquiries, etc. on their accounts.  S

  • Where is DVD Player?

    Spotlight can't find it, nor can I by the crude method of looking in Applications, and it isn't offered as an option in the CDs and DVDs Preference Pane. Yet when I try to install the downloaded .dmg from Apple, it refuses because "the version instal