How to open a BLOB column stored in oracle using OLE wrappers

Hello friends
I have a strange problem, I have OLE objects like, *.doc, *.xls, *.bmp etc all these files have been embedded in oracle database using OLE2.0 & wrapping technology. Well I have to extract this data outof BLOB column from Oracle database & store it in OS file in its respective format
For Eg. If the BloB data which has been embedded in Oracle database using OLE2.0 & wrapping is of *.doc file then the OS file which I have stored after extraction I should be able to open in MS word.
Well in this task I am able to extract the file using GETCHUNK feature from VB , but I am not able to open the OS file in MS word as it is saying the error
the document you are trying to open is not supported by MS Word
So please any one of you can help me to solve this problem I wil be very helpful. also if you have suported code for ths problem It is welcome
Not only using VB if you have code of any other langauges also itis welcomed
Thanks
Adhem

Please "Preview" your future posts. Your formatting is awful. Especially learn to use the [ code ] tags.
Are you sure DateTime.Now.ToString() returns a string in the format of 'MM/DD/YYYY HH:MI:SS.FF3'?
Fix that and if you still having the problems, debug the actual result of your string.Format() and post that.

Similar Messages

  • How to display a BLOB column in ADF.

    How to display a BLOB column in ADF.

    hi agowlikar786
    Maybe the forum thread "ADF BC : download BLOB " can help
    at ADF BC : download BLOB
    regards
    Jan

  • How to Ftp a Blob attachment in a table using osb service

    How to Ftp a Blob attachment in a table using osb service
    I tried with DBadapter select it does not work ... For blob objects cant use select throws error as expected number got blob
    can call a stored procedure to write the file to some directory but that file will not be created with the same name of the file as stored in DB .. need to hard code the filename in utl file or if we pass a variable to get the name of the attachment file we have to use select query in cursor which throws error like above in step 2
    Can some body tell me how to get the blob attachment with the same name as it is stored in DB table
    Edited by: user13745573 on Jan 31, 2011 4:35 AM

    Hi,
    I want to send an attachment through email.
    But I want to pick the file from say local drive then how can i specify the path of the file in file name.
    Also, i dont want ot append the conent from payload to the file. i wanted to sendthe file as is.
    <ema:attachment>
    <ema:name></ema:name>
    <ema:type>text/plain</ema:type>
    <ema:content/>
    </ema:attachment>
    Please help.

  • How to upload a file to a BLOB column in the DB using PL/SQL???

    Hi
    I am trying to upload a file to a BLOB column in my database. I wana do this using some pl/sql procedure.I don't wana use webutil. is it possible??? and if so can anybody help me with this???
    Regards
    Shiraz

    Hello,
    This is a stored procedure sample that show how insert into CLOB, BLOB and BFILE columns
    CREATE OR REPLACE PROCEDURE Insert_document
         PC$Type IN DOCUMENT.TYP%TYPE
        ,PC$Nom IN DOCUMENT.NOM_DOC%TYPE
        ,PC$Texte IN VARCHAR2
        ,PC$Image IN VARCHAR2 
        ,PC$Fichier IN VARCHAR2
       ) IS
      L$Blob BLOB;
      L$Clob CLOB;
      L$Bfile BFILE;
      LN$Len NUMBER := dbms_lob.lobmaxsize;
      LN$Num NUMBER ;
      LN$src_off PLS_INTEGER := 1 ;
      LN$dst_off PLS_INTEGER := 1 ;
      LN$Langctx NUMBER := dbms_lob.default_lang_ctx ;
      LN$Warn NUMBER;
      BEGIN
        -- Création of new raw --
        If PC$Fichier is not null Then
           L$Bfile := BFILENAME( 'FICHIERS_IN', PC$Fichier );
        End if ;
        -- Creation of temporary objetcs --
        dbms_lob.createtemporary( L$Clob, TRUE ) ;
        dbms_lob.createtemporary( L$Blob, TRUE ) ; 
        -- Loading text in CLOB column --
        If PC$Texte is not null Then
           L$Bfile := BFILENAME( 'FICHIERS_IN', PC$Texte );
           dbms_lob.fileopen(L$Bfile, dbms_lob.file_readonly);
           If dbms_lob.fileexists( L$Bfile ) = 1 Then
             dbms_output.put_line(PC$Texte || ' open' ) ;
             dbms_lob.loadclobfromfile(
                                       L$Clob,                -- Destination CLOB
                                       L$Bfile,               -- Source file pointer
                                       LN$Len,                -- # bytes to read
                                       LN$src_off,            -- Source start position
                                       LN$dst_off,            -- Target start position
                                       dbms_lob.default_csid, -- CSID
                                       LN$Langctx,            -- Language Context
                                       LN$Warn);              -- Warning message
             dbms_lob.fileclose(L$Bfile);
          Else
             raise_application_error( -20100, 'Erreur ouverture ' || PC$Texte ) ;
          End if ;
        End if ;
        -- Loading image in BLOB column --
        If PC$Image is not null Then
           L$Bfile := BFILENAME( 'FICHIERS_IN', PC$Image );
           dbms_lob.fileopen(L$Bfile, dbms_lob.file_readonly);
           dbms_lob.loadblobfromfile(
                                     L$Blob,       -- BLOB de destination
                                     L$Bfile,      -- Pointeur de fichier en entrée
                                     LN$Len,       -- Nombre d'octets à lire
                                     LN$src_off,   -- Position source de départ
                                     LN$dst_off);  -- Position destination de départ
           dbms_lob.fileclose(L$Bfile);
        End if ; 
        -- Save --
        Insert into DOCUMENT (ID, NOM_DOC, TYP, UTILISE, LOB_TEXTE, LOB_DATA, LOB_FICHIER)
               Values( SEQ_DOCUMENT.NEXTVAL, PC$Nom, PC$Type, NULL, L$Clob, L$Blob, L$Bfile ) ; 
        -- Free the temporary objects --
        dbms_lob.freetemporary( L$Clob ) ;
        dbms_lob.freetemporary( L$Blob ) ; 
      END;
    /The table structure for this sample is the following:
    CREATE TABLE DOCUMENT (
      ID           NUMBER (5) PRIMARY KEY,
      TYP          VARCHAR2 (20),
      UTILISE      VARCHAR2 (30),
      LOB_TEXTE    CLOB,
      LOB_DATA     BLOB,
      LOB_FICHIER  BFILE,
      NOM_DOC      VARCHAR2 (100))
    /Francois

  • 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 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 update a BLOB column in a table with a file in local machine?

    I have a file (of XML type) in my local machine. I want to update it in a BLOB column of a table in databse server. Can anyone help me in this regard. Appreciate your help.
    Regards
    Walter Nicholas

    user447427 wrote:
    I have a file (of XML type) in my local machine. I want to update it in a BLOB column of a table in databse server. Can anyone help me in this regard.That's the client's job to read data on the client PC (from keyboard/mouse/scanner/file/whatever input) and submit that to the database server for processing and/or storage.
    You cannot expect the server to hack into your PC and lift that data in the file from your disk. Not that is not technically possible. You can wire rockets onto a bicycle to make it go faster, but that's not a wise thing to do. Similarly, it is not a bright idea to ignore the very basics of client-server.
    Bottom line - you need client s/w on your PC to load the content of that file into Oracle. It can be done using SQL*Loader as already suggested. It can be done using a web browser (submitting it via HTTP to web-enabled PL/SQL code). You can use FTP or WebDav and upload into Oracle's XDB (XML database).
    Your requirements will determine what client to use. Once off load? SQL*Loader is very easy to use for loading XML files into the database.

  • How to read the blob column?

    Hi,
    i wanted to store the zip file in a blob column and i also want to download the file
    i have tried in the following manner
    -- Creation of the table
    create table demo
    ( ID int,
    theblob blob);
    --insert the zip file into the table
    declare
    l_blob blob;
    l_bfile bfile;
    begin
    insert into demo values ( 5, empty_blob() )
    returning theBlob into l_blob;
    l_bfile := bfilename( 'MWDIR_TST', 'demo.zip' );
    dbms_lob.fileopen( l_bfile );
    dbms_lob.loadfromfile( l_blob, l_bfile,
    dbms_lob.getlength( l_bfile ) );
    dbms_lob.fileclose( l_bfile );
    end;
    -- Function to convert the blob into clob
    CREATE OR REPLACE FUNCTION XBLOB_To_CLOB(L_BLOB BLOB) RETURN CLOB IS
    L_CLOB               CLOB;
    L_SRC_OFFSET     NUMBER;
    L_DEST_OFFSET     NUMBER;
    L_BLOB_CSID          NUMBER := DBMS_LOB.DEFAULT_CSID;
    V_LANG_CONTEXT     NUMBER := DBMS_LOB.DEFAULT_LANG_CTX;
    L_WARNING          NUMBER;
    L_AMOUNT          NUMBER;
    BEGIN
    IF DBMS_LOB.GETLENGTH(L_BLOB) > 0 THEN
    DBMS_LOB.CREATETEMPORARY(L_CLOB, TRUE);
    L_SRC_OFFSET := 1;
    L_DEST_OFFSET := 1;
    L_AMOUNT := DBMS_LOB.GETLENGTH(L_BLOB);
    DBMS_LOB.CONVERTTOCLOB(L_CLOB,
    L_BLOB,
    L_AMOUNT,
    L_SRC_OFFSET,
    L_DEST_OFFSET,
    1,
    V_LANG_CONTEXT,
    L_WARNING);
    RETURN L_CLOB;
    ELSE
    L_CLOB:= TO_CLOB('');
    RETURN L_CLOB;
    End IF;
    DBMS_LOB.FREETEMPORARY(L_CLOB);
    END XBLOB_To_CLOB;
    -- Procedure to wtire clob into file
    CREATE OR REPLACE PROCEDURE Write_CLOB_To_File ( directory_name varchar2,filename varchar2, clob_loc CLOB )
    IS
    buffer VARCHAR2(32767);
    buffer_size CONSTANT BINARY_INTEGER := 32767;
    amount BINARY_INTEGER;
    offset NUMBER(38);
    file_handle UTL_FILE.FILE_TYPE;
    BEGIN
    file_handle := UTL_FILE.FOPEN(location => directory_name,filename => filename,open_mode => 'w',max_linesize => buffer_size);
    amount := buffer_size;
    offset := 1;
    -- READ FROM CLOB / WRITE OUT TO DISK
    WHILE amount >= buffer_size
    LOOP
    DBMS_LOB.READ(lob_loc => clob_loc,amount => amount,offset => offset,buffer => buffer);
    buffer:=replace(buffer,chr(13),'');
    offset := offset + amount;
    UTL_FILE.PUT(file => file_handle,buffer => buffer);
    UTL_FILE.FFLUSH(file => file_handle);
    END LOOP;
    UTL_FILE.FCLOSE(file => file_handle);
    END Write_CLOB_To_File;
    -- To execute use the following example
    declare TmpClob CLOB;
    begin
    select XBLOB_TO_CLOB(theblob) into TmpClob from demo where id=5;
    Write_Clob_To_File('TEMP','demo.txt',TmpClob);
    end;
    when i am excuting the above code it is not bringing the exact binary values from the database ?
    can any one help me on this?
    Thanks
    Rangan S

    On another note it's always a good idea to tell us what database version you are using e.g. 9.2.0.7 or 10.2.0.3 etc. as this will allow us to tailor our answers appropriately in case there are features we can't use because you are using an older version.
    And, when posting code, please put {noformat}{noformat} tags around it so that it keeps its formatting on the forum.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to retrive the blob data from a table using sql query

    Hi gurus,
    I have a table which has " BLOB "content in a column .I want to view the data From BLOB column using sql query .It would be helpfull If some one share their idea.
    Regards,
    vardhani.

    You can use data templates.
    See this: http://blogs.oracle.com/xmlpublisher/entry/blob_clob_raw_and_looooong
    http://blogs.oracle.com/xmlpublisher/entry/inserting_blobs_into_your_repo
    Thanks,
    Bipuser

  • How to open a window in full screen mode using lf_fpm_navigation?

    Hi Guys
    For the following applications
    ESS Application: HAP_START_PAGE_POWL_UI_ESS
    MSS Application: HAP_START_PAGE_POWL_UI_MSS
    When the user clicks on the appraisal document name, a seperate window(not full screen) is generated to display the Appraisal docuemnt.
    The code is as follows:
    COMP: HAP_START_PAGE_POWL_UI
    Object : COMPONENTCONTROLLER
    Method: FOLLOWUP_POWL
    Generate the URL to be called.
        CALL METHOD cl_wd_utilities=>construct_wd_url
          EXPORTING
            application_name = 'HAP_MAIN_DOCUMENT'
            in_parameters    = lt_parameters
          IMPORTING
            out_local_url    = l_url.
        wd_this->url = l_url.
        wd_this->display_document( ).
    In Method: DISPLAY_DOCUMENT
    lv_alias = 'EMPLOYEE_DOCUMENT_UI_OBN'.
    use FPM navigation
        ls_nav_key-key1 = 'HAP'.
        ls_nav_key-key2 = 'HAP_GENERIC_UI'.
        lr_fpm_navigation ?= lr_fpm->get_navigation( is_key = ls_nav_key iv_instance_sharing = abap_false ).
        CALL METHOD lr_fpm_navigation->get_key_from_alias
          EXPORTING
            iv_alias = lv_alias
          RECEIVING
            rv_key   = lv_key.
        lr_fpm_navigation->modify_parameters(
             EXPORTING
               id_target_key            = lv_key
               it_application_parameter = lt_appl_param
               it_business_parameter    = lt_business_param    ).
        lr_fpm_navigation->navigate( lv_key ).
    Any idea how to open this window in full screen?
    Highly appreciate your help.
    Thank and Regards
    Pramod

    Hi Pramod,
    This FPM navigation is achieved using settings made in Launchapd Customizing ( LPD_CUST ).
    a) Execute Tran LPD_CUST
    b) Go to Role HAP - Double Click to open it.
    c) Open the second folder on the LHS menu - there you will find 2 entries
    d) Click on second entry - in the entry setting you can see that it is configured for WD Application  - HAP_MAIN_DOCUMENT
    e) Click on button Show Advanced Parameters
    f) There you will find a input box named as Window Features - here you can specify window features like
    height=700,width=1100,position=center,menu=no,status=no,location=no,menubar=no,status=no,toolbar=no
    save the settings come out and test ur app again.
    change the height and width and other features as per ur req.
    Regards
    Manas Dua

  • How to get text from column  labels in pivot using javascript?

    Hi, is it possible to get text from column labels in pivot using javascript? How?

    You don't get a response from a URLRequest, you get the response from a URLLoader:
    View this sample page for URLRequest and URLLoader and I think it'll make more sense to you.
    http://help.adobe.com/en_US/air/reference/html/flash/net/URLRequest.html#URLRequest()

  • How to open .xls work sheets in I phone using numbers

    HHow to open .xls work sheets in I phone using numbers

    Howdy Rmsdxb,
    The help page linked below details how to go about opening spreadsheets on your iPhone.
    Numbers Help for iPhone - Open an existing spreadsheet
    http://help.apple.com/numbers/iphone/2.5/#/tan753033f43
    All my best,
    Allen

  • How to open a report in a new window using RWWebServiceProxi????

    Which? First and foremost a greeting to all, here again bothering.
    I have an application in JDeveloper 10g and need to open a few reports designed in Oracle Reports 10g. Get jobId with RWWebServiceProxy and that works well.
    The league's report is generated correctly,
    The only problem I have is that I need to deploy the report in a separate window to which invokes the report. This when a click commandButton.
    Does anyone know what is the trick?
    Thank you, greetings.

    Thanks for answering Frank, goLink may be linked to a method of backbean?
    That what we need is to generate jobId through a method and immediately after deployment of the report on another page.
    Already tried to goLink component but unfortunately does not have the property to execute a method Action.

  • How to open an internet browser inside an Oracle Form?

    Hello,
    I am using Oracle forms 10g and I want to open  any internet browser inside my oracle form. Any idea if it is even do able in the forms.
    Thanks in advance for your help!
    Hemangi

    Are you talking about displaying a webpage directly inside of an Oracle Form or simply opening a webpage (in a browser window) form a Form?
    If you want embed a webpage in a Form, then this can only be done by extending Forms functionality througha Java Bean.  Take a look at this Java Bean:  A Full Web Browser Java Bean .
    If you just want to open a web page from Forms the MST is correct.
    Craig...

  • How to connect to a Sql server from Oracle using db link

    Hi All,
    Does anybody have any idea about how to connect to a sql server from oracle database using db link to syncronize the data? I need to pull the data from Sql server table to Oracle tables and relay messages back to the sql server.
    Thank you,
    Praveen.

    we have 2 products - DG4MSQL and DG4ODBC.
    DG4ODBC is for free and requires a 3rd party ODBC driver and it can connect to any 3rd party database as long as you use a suitable ODBC driver
    DG4MSQL is more powerfull as it is designed for MS SQL Server databases and it supports many functions it can directly map to SQL Server equivalents - it can also call remote procedures or participtae in distributed transactions. Please be aware DG4MSQL requires a license - it is not for free.
    Check out Metalink and you'll find notes how to configure both products.
    For a generic overview:
    Note.233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases
    And the setup notes:
    DG4ODBC
    Note.561033.1 How to Setup DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX) :
    Note.466225.1 How to Setup DG4ODBC (Oracle Database Gateway for ODBC) on Windows 32bit RDBMS.HS-3-2 :
    Note.109730.1 How to setup generic connectivity (HSODBC) for 32 bit Windows (Windows NT, Windows 2000, Windows XP, Windows 2003) V817:
    Note.466228.1 How to Setup DG4ODBC on Linux x86 32bit
    DG4MSQL
    Note.466267.1 How to Setup DG4MSQL (Database Gateway for MS SQL Server) on Windows 32bit
    Note.562509.1 How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) 64bit Unix OS (Linux, Solaris, AIX,HP-UX)
    Note.437374.1 How to Setup DG4MSQL (Oracle Database Gateway for MS SQL Server) Release 11 on Linux

Maybe you are looking for

  • Problem with HP Photosmart Premier software

    I have an old custom built desktop PC running Windows XP Pro.Recently I started receiving an error message from my HP Photosmart Premier photo program the "OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT." Since I don't have a clue what this mea

  • Xslt transformation rules for BPEL

    Hi there, Can anyone advise where I can find the xslt transformation rules for BPEL. I am unable to find the mentioned file "114.XSLTTransformations". Best regards! Linda

  • BRIDGE vs ROUTER

    How can i configure Airport Extreme as a bridge instead of a router ? Is there any technical documentation that help me with this issue ? thank you, Paulo

  • HELP, need quick script fix

    Hi, Our InDesign is acting up here. We are designing massive amounts of tables for various annual reports. After the design for print is done, these tables need exporting to xHTML. We have tested this extensively, and written complicated CSS files an

  • HT2375 what is midi timeout error? how can I fix it?

    logic pro has detected a midi timeout error initializing mac osx midi services not avaliable HOW CAN I FIX IT?