Wednesday, June 18, 2014

Read Image file from oracle 10g forms



 step 1. connect your terget user and run the webuitl script using sqlplus or sqlplusw located at
        %ORACLE_HOME%\forms\create_webutil_db.sql



step 2. Download jacob.dll and jacob.jar file
        Download location https://googledrive.com/host/0B5DZvtSmSXRITmREUTQ1ZmxYb0U/jacob_18.zip

step 3. Place the jacob.dll file into %ORACLE_HOME%\forms\webutil and jacob.jar file into
        %ORACLE_HOME%\forms\java directory.



step 4. configer the "formsweb.cfg" file under %ORACLE_HOME%\forms\server
        as like as the following

    [lms]
    form=E:\LMS\Forms\LMS_TEMPLATE.fmx
    userid=lms/lms@orcl
    width=100%
    height=100%
    background=/forms/formsdemo/images/blue.gif
    WebUtilArchive=frmwebutil.jar,jacob.jar
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljpi.htm
    baseHTMLjpi=webutiljpi.htm
    archive_jini=frmall_jinit.jar,demo.jar,jacob.jar
    archive=frmall.jar,demo.jar,jacob.jar
    lookAndFeel=oracle



step 5. configer webutil.cfg file by changing two line at the bottom of this page

    transfer.database.enabled=TRUE
    transfer.appsrv.enabled=TRUE



step 6. Open form builder and create a form with a push button and a image field.

step 7. attach webutil.pll in the pl/sql libraries and webutil.olb in the object library and
        compile the pl/sql library
        Expand the object library copy the "webutilconfig" and "webutil" in the form.



step 8. attach webutil.pll in the "attached libraries" under form module


step 9. Create the following when-button-pressed trigger under push button.

    DECLARE
    v_file VARCHAR2(4000) := client_get_file_name ('','','jpeg Files/*.jpg',
    'select a image', open_file,TRUE);
    it_image_id ITEM:=FIND_ITEM('CONTROL.CUSTOMER_IMAGE');
    BEGIN
    client_image.read_image_file(v_file,'',it_image_id);
    END;


step 10. compile and Run the form. Hope your form will run correctly.

If you want to see the video tutorial follow the link
http://youtu.be/yUWzuEp4blE
Or
Click here