DDE Package in FORMS 4.5

Does anyone now, in which version of Forms the DDE built-in-
package did appear the first time and whether there is a
differen related to this topic betwenn Forms on Windows nd Forms
on Unix (i.e. HPUX).
Michael

Joel I think you'll have to use the short name for "program files" e.g. the version you'd get in a Dos "DIR /x" command - something like "progra~1"

Similar Messages

  • How to use DDE package in form 10g module

    Hi All,
    I am using DDE.package in form 10g for uploading excels data in oracle database at windows platform but it is showing non-oracle exception.
    Thanks

    hi
    mehwish............just do for attachment.......
    u can also use something like this...
    Execute send_mail;and also.
    try something like this..
    example:
    begin
    mahi.mail('email address','subject','message','attachment');
    end;Edited by: Sarah on Apr 18, 2011 10:25 AM

  • WebUtil and DDE-package

    Hello,
    does anybody know, if there will be something like a CLIENT_DDE-package (related to the old DDE-package of forms) in webutil. The first announcements of Oracle about WebUtil told so, but now there is nothing left about it.
    Any suggestions?
    Thank you in advance!

    Roelof J van Suilichem
    In forms 9i, which is on web architechture, does DDE work ?
    i.e. if I want to read a .xls located on a network drive, and load that data into a table, is it possible using DDE in forms 9i.
    Thanks

  • DDE error in Forms 4.5 running Win2k

    We are upgrading our O/S from Win95 to Win2k and we have several forms that creates a .csv file using TEXT_IO package and calls Excel using the DDE package. It works fine on Win95 but when we run it under Win2k it gives me problems.
    Right now we:
    <cut>
    v_app_location := 'C:\MSOFFICE\Office\excel.exe C:\Starsrpt\daylcnsrpt.csv';
    AppID := DDE.APP_BEGIN (v_app_location,DDE.APP_MODE_MAXIMIZED);
    <cut>
    Now the location of Excel is changing in Win2k, so once I made the directory path change it falls into the DDE.APP_FAILURE excpetion:
    <cut>
    v_app_location := 'C:\Program Files\Microsoft Office\Office\EXCEL.EXE c:\starsrpt\daylcnsrpt.csv;
    AppID := DDE.APP_BEGIN (v_app_location,DDE.APP_MODE_MAXIMIZED);
    <cut>
    I know that while using the DDE.APP_BEGIN, the first indication of a space means that the next string of characters is used as the file in which to open within the aforementioned application (Excel). Is this the reason for the error to occur and if so, what is the work around? (I have tried concatinating the CHR(32) value (ASCII of ' ' (SPACE)) and it falls into the same error. Any ideas would be great.
    Thanks.
    joel

    Joel I think you'll have to use the short name for "program files" e.g. the version you'd get in a Dos "DIR /x" command - something like "progra~1"

  • I need any documents OLE2 and DDE package

    Dear all,
    I need to fully explanation OLE2 and DDE package. Pressing F1 provides very limited help for me. Anyone here have or know some links of any reading materials
    (e-books, documentation)?
    Please share
    thanks
    regards

    Google is your friend.
    Check Forms online help it has enough information to work with.

  • DDE Package refusing to take more than 265 CHAR

    Dear all,
    i'm using Oracle 9i, i'm using the DDE package to get data from Excell
    this is my code
         DECLARE
         CONVID PLS_INTEGER;
         AppId PLS_INTEGER;
         BUFFER VARCHAR2(5000);
         LEN NUMBER;
    BEGIN
    AppId := Dde.App_Begin('C:\Program Files\Microsoft Office\OFFICE11\Excel.exe C:\abc.xls' , DDE.APP_MODE_MAXIMIZED );
    CONVID := DDE.INITIATE('EXCEL','C:\abc.xls');
    DDE.REQUEST(CONVID,'R7C6',BUFFER,DDE.CF_TEXT,10000);
    :DATA:= BUFFER;
    DDE.TERMINATE(CONVID);
    DDE.APP_END(APPID);
    END;
    the R7C6 cell contain a text of 270 character. in the buffere it is returning only 265 character.
    if anyone please can tell me what cuase this.
    Message was edited by:
    nbreik

    If changing the data type to CLOB is NOT a option at the moment then you can work around using DBMS_SQL to get the LENGTH of the LONG column.
    Something Like what I have below (Not tested) –
    In this Function, I am passing the “Id” <Key> of the record to search and check the length of the LONG column. You can chose to pass ROWID instead.
    Declare
    lRtnLen Number := 0;
    FUNCTION fn_len_long_str ( p_RecId In Number )
    RETURN number As
    mycursor Integer default DBMS_SQL.open_cursor;
    l_x number;
    l_long_value varchar2(32760);
    l_len_of_long number;
    l_blen number := 32760;
    l_pos number := 0;
    BEGIN
    DBMS_SQL.parse( mycursor, 'select col2 from Test3 Where Col1 = :pCol2',
    dbms_sql.native );
    DBMS_SQL.bind_variable( mycursor, ':pCol2', pId );
    DBMS_SQL.define_column_long(mycursor, 1);
    l_x := DBMS_SQL.execute(mycursor);
    if (dbms_sql.fetch_rows(mycursor)>0)
    then
    loop
    DBMS_SQL.column_value_long(mycursor, 1, l_blen,
    l_pos ,
    l_long_value, l_len_of_long );
    l_curpos := l_pos + l_len_of_long;
    EXIT when l_len_of_long = 0;
    end loop;
    end if;
    DBMS_SQL.close_cursor(mycursor);
    RETURN l_curpos;
    exception
    when others then
    END fn_len_long_str;
    Begin
    lRtnLen := fn_len_long_str (Pk_Of_The_Table);
    Dbms_output.Put_Line ('Len Of LONG = ' || lRtnLen);
    End;
    /

  • OLE2 and DDE package books

    Hi All,
    I need to fully understand OLE2 and DDE package. Pressing F1 provides very limited help for me. Anyone here have or know some links of any reading materials(e-books, documentation)?
    Please share... I'm drowned with my tasks here.
    Thanks!

    DDE is seriously outdated and should only be considered as a last resort. As for OLE2, concern yourself not with learning the OLE2 package, but instead, with understanding OLE automation. The OLE2 package is just a wrapper that makes it possible to manipulate OLE automation servers from PL/SQL. Once you understand OLE, using OLE2 should come easily.
    I learned OLE automation as a Visual Basic developer, before ever working with Oracle, and found it to be fairly straightforward. The easiest and cheapest way to learn OLE automation is by using Microsoft's Visual Basic for Applications IDE -- an Office component. Search this forum using keywords VBA and Tutorial, and you will find information that should hopefully prove helpful.
    As for Mark's assertion that XML provides a simpler solution, there are important differences between the XML and OLE approaches. The XML approach involves simply creating a document, whereas the OLE approach involves instructing the OLE server application to create a document. XML might be perfect, for example, if you wish to create Word documents on a *NIX server.  On the other hand, when your environment permits it, OLE makes it possible to leverage application functionality, like Excel's data analysis functions.
    Eric Adamson
    Lansing, Michigan

  • Exists Asynchronous mode in execution of package from Forms?

    Hi people
    Exist asynchronous mode in execution of package from Forms 6i? , the database is Oracle9i.
    Thanks
    regards
    Hector Ulloa Ligarius

    Hi...
    I will use, DBMS_JOB, call one time and delete Job from Forms6i or Forms9i...
    I use Oracle9ir2, the migration a Oracle10g, will not posible...
    Thanks
    Regards
    Hector Ulloa Ligarius
    Santiago of Chile...

  • Package of Forms 6 don't Work???

    Hi all,
    I have a serious problem concering the call of simple fuction of forms 6 like: Do_key, call_form and so on!!
    i explain the problem, i have moved my fmx form to the Intranet server, and i found out that my form could not call any function like Do_key('Enter_query'), but when i replace the instruction with just 'Enter_query it works'???? as if the forms Server don't find the package of forms 6??? is it normal?? or is the package of forms 6 created when we install for the first time the forms6 server side?? or maybe there is a path that i should specify in order to find these functions???
    Anyone can help me please???

    you may have had matching instance names, but not the same
    instances.
    for example, if you have an object with instance name name1
    on frame 1. then create a blank keyframe on frame 2 and then a
    keyframe on frame 3 and drag another object from the library (and
    it can be the same library object) and name it name1, the frame 1
    and frame3 objects will be different instances. code referencing
    the object in frame 1 will not reference the object in frame 3 (and
    vice-versa).
    if you create frame 1 and create name1 in that frame, then
    create keyframe 3 (so name 1 is in both frames) and finally create
    blank keyframe 2, the 2 instances will be the same. any code
    referencing name1 will reference both objects.

  • Running package within forms

    Does anybody know how to run a package within forms (in the background?)
    Example: I need to run a package to update some tables but I don't want the user to have to wait for that package to complete before making modifications to the form. It is less than a 10 second wait but it appears that the form is hung up.
    thank you.

    Before you start the process, your form could display a stacked canvas telling the user to wait, and then after the package returned control to the form, the form could hide the canvas.

  • Using DDE with Oracle Forms for uploading Excel data

    Hi There,
    I have used DDE in Forms to upload data from Excel.
    The code which I have implemented is as follows:
    DECLARE
    iApplication pls_integer;
    iConv pls_integer;
    v2Buffer varchar2(100);
    v2text varchar2(100);
    nLength number;
    nTransactionId number;
    /* these varrays are defined in a package specification*/
    vExcelProduct p_upload_functions.prd_no:=p_upload_functions.prd_no('1');
    vExcelVpc p_upload_functions.vpc:=p_upload_functions.vpc('1');
    BEGIN
    /*Open an DDE Server application*/
    iApplication:= DDE.App_Begin('C:/excel.exe ‘||v2fileName,DDE.App_Mode_Minimized);
    iConv:=DDE.Initiate('EXCEL',v2filename);
    BEGIN
    /* first row of the sheet used for title . So loop is started from 2*/
    /* Reading a row*/
    FOR I IN 2..10000
    LOOP
    /* Reading columns of a particular row*/
         FOR J IN 1..n / * n be the number of columns in excel sheet */
         LOOP
    /* generate the cell no of excel sheet from where data will
    be fetched- R is used for row no and C is foe column no*/
         v2text:='R'||I||'C'||J||':'||'R'||I||'C'||J;
    /* Store the value in variable */
    dde.request(iConv,v2text,v2Buffer,dde.cf_text,1000);
    /*Stores values in the varrays for a row*/
    IF j=1 THEN
    /* for first column*/
    nLength:=length(v2Buffer);
    vExcelOrg(I-1):=To_Number(substr(v2Buffer,1,nLength-2));
         /* for second column */
    ELSIF j=2 THEN
    nLength:=length(v2Buffer);
    vExcelProduct(I-1):=substr(v2Buffer,1,nLength-2);
    END IF;
    END LOOP;
    /*Exit the loop when it encounters an empty row*/
    IF vExcelProduct(I-1) IS NULL AND vExcelOrg(I-1) IS NULL THEN
    EXIT;
    END IF;
    /* Otherwise extending the varray*/
    vExcelProduct.extend;
    vExcelOrg.extend;
    /* Reading the next row*/
    END LOOP;
    /* Now close the DDE application */
    DDE.app_end(iApplication);
    DDE.terminate(iConv);
    EXCEPTION
         WHEN Others THEN
         DDE.app_end(iApplication);
    DDE.terminate(iConv);
    RAISE Form_Trigger_Failure;
    END;
    I am facing a problem, I will appreciate if you can give some insights to help.
    We have been having problem logging in to application when there are a number of EXCEL processes running (17-18) on the server. Users that have already logged in have no problem, but new login will get "FRM-92101 There was a failure in the Forms Server during startup". The Forms Server itself is running fine. After we killed a few EXCEL processes, new users will be able to login.
    Thanks and regards,
    Mandeep

    this is a trial method and right now i am trying to read only the first cell of the excel sheet and return that value and show it in the UI when the user presses the button but this code is not returning any value.
    METHOD read_excel.
      INCLUDE ole2incl.
      DATA: filename(128) TYPE c,
                excel TYPE ole2_object,
                cell TYPE ole2_object,
                workbook TYPE ole2_object,
               pfile TYPE localfile VALUE
               'C:\Documents and Settings\I047323\Desktop\new.xls',
                name TYPE string.
      CREATE OBJECT excel 'EXCEL.APPLICATION'.
      SET PROPERTY OF excel 'VISIBLE' = 0.
      CALL METHOD OF excel 'WORKBOOKS' = workbook.
      CALL METHOD OF workbook 'OPEN'
        EXPORTING  #1       = pfile.
        CALL METHOD OF excel  'CELLS' = cell
          EXPORTING
            #1      = 1
            #2      = 1
        GET PROPERTY OF cell 'VALUE' = value.
      CALL METHOD OF workbook 'SAVE'.
      CALL METHOD OF workbook 'CLOSE'.
      CALL METHOD OF excel 'QUIT'.
      FREE OBJECT excel.
    ENDMETHOD.
    Edited by: neelima v on Jan 14, 2008 4:06 PM

  • OSB to SOA suite package not forming correctly

    Setup is as follows:
    AIX 5.3 on the box, 10 gigs ram, installation of the latest releases of OSB and SOA suite on top of weblogic. I've built out a couple of simple database queries in BPEL based off wsdls, dropped them on to the SOA suite server, used EM to open a test console and plugged in some search data. Search returns successfully.
    I then open up OSB's console, create a business service to the endpoint on the soa server, and a proxy based off the same wsdl used in the BPEL construction which I then route to the business service. Both service and proxy are made with basic http for the protocol (not sure how to use the sb protocol, and not sure if that will fix the problem). Load the test console on the proxy service, which displays an xml form similar to what is used in the SOA suite. Fill out the same information, but the invoke returns BEA-380000. Following the invocation trace in OSB everything looks good in terms of package content.
    Wondering if it might simply be a problem with how the OSB interprets XML from a wsdl, I piped the XML from the SOA suite into the OSB's xml field, but to no luck, same error. After some more testing and frustration,I put the SOA suite XML straight in to the form field in the OSB test console, and it worked. However, the package itself seems oddly formed, consisting of:
    <soapenv:Envelope      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <soap:Header      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
         </soap:Header>
         <soapenv:Body>
         <soap:Envelope      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
         <soap:Header/>
    Which I've been told is basically double wrapping the package, which shouldn't work, and more importantly wont be generated when someone uses say SOAPUI to access our service on the OSB.
    Now, on the SOA suite side of things. In EM console, I navigate to my BPEL process and can see the faults caused by the OSB. The same faults are also generated when binding to the OSB's endpoint with SOAPUI, but not when going directly to the SOA suite's endpoint. The error is the following:
    oracle.j2ee.ws.saaj.soap.SOAPVersionMismatchException: Mime Header Content-Type: text/xml requires SOAP envelope namespace: http://schemas.xmlsoap.org/soap/envelope/: Mime Header Content-Type: text/xml requires SOAP envelope namespace: http://schemas.xmlsoap.org/soap/envelope/
    And the payload sent shows as empty.
    So to my best uneducated guess, it looks like the OSB wraps the payload in an envelope, and then unwraps it before handing it to the SOA suite, which expects the payload to be wrapped. Sadly, I'm still pretty new to the wsdl/webservice/oracle world, so I'm not even sure if that's an accurate representation. Any insight on what might be happening or how to get OSB to talk with SOA suite correctly would be greatly appreciated. Included below are the XML payloads I've used (minus a bit for confidentiality reasons). Apologies if the formatting doesn't work so nice for it.
    OSB Generated (fails):
    SOAP Header:
    <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    </soap:Header>
    Body:
    <ns2:SyncEmployeeIDRequest xmlns:ns="removed" xmlns:ns1="removed" xmlns:ns2="removed">
    <!--You have a CHOICE of the next 2 items at this level-->
    <ns:PersonIdentificationAssertion>
    <!--Optional:-->
    <ns1:PersonBirthDate>
    <ns1:Date>2008-09-28</ns1:Date>
    </ns1:PersonBirthDate>
    <!--Optional:-->
    <ns1:PersonGivenName>string</ns1:PersonGivenName>
    <ns1:PersonSurName>string</ns1:PersonSurName>
    </ns:PersonIdentificationAssertion>
    <ns1:DepartmentIDText>string</ns1:DepartmentIDText>
    </ns2:SyncEmployeeIDRequest>
    SOA Generated(works if plugged into OSB form field)
    SOAP Header:
    <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    </soap:Header>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
         <soap:Header></soap:Header>
         <soap:Body xmlns:ns1="removed">
              <ns1:SyncEmployeeIDRequest xmlns:ns2="removed">
                   <ns2:PersonIdentificationAssertion xmlns:ns3="removed">
                        <ns3:PersonBirthDate>
                             <ns3:Date>2008-09-28</ns3:Date>
    </ns3:PersonBirthDate>
                        <ns3:PersonGivenName>string</ns3:PersonGivenName>
                        <ns3:PersonSurName>string</ns3:PersonSurName>
    </ns2:PersonIdentificationAssertion>
    </ns1:SyncEmployeeIDRequest>
    </soap:Body>
    </soap:Envelope>
    Working Request Document in OSB:
    <soapenv:Envelope      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <soap:Header      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
         </soap:Header>
         <soapenv:Body>
         <soap:Envelope      xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
         <soap:Header/>
         <soap:Body      xmlns:ns1="removed">
         <ns1:SyncEmployeeIDRequest      xmlns:ns2="removed">
         <ns2:PersonIdentificationAssertion      xmlns:ns3="removed">
         <ns3:PersonBirthDate>
         <ns3:Date>2008-09-28</ns3:Date>
         </ns3:PersonBirthDate>
         <ns3:PersonGivenName/>
         <ns3:PersonSurName>ALastName</ns3:PersonSurName>
         </ns2:PersonIdentificationAssertion>
         </ns1:SyncEmployeeIDRequest>
         </soap:Body>
         </soap:Envelope>
         </soapenv:Body>
         </soapenv:Envelope>
    If I can provide anymore information that will help shed light on this issue please let me know.
    Thank you for your time.
    ~Nick

    Problem solved. When I originally created my business service inside of OSB, I created it based off an endpoint provided by the SOA server. Instead, I went and did a mass import from a url, pointed it at the SOA server wsdl, and then built the web service off of that wsdl resource in the OSB. Now it works like a charm.

  • How to simulate DDE in Web Forms?

    Surely there is some elegant way to do DDE in a Web Forms (6i)environment?
    Given that Forms 7i will only support internet deployment and not C/S, there must be some "migration path" to replace the functionality of DDE in the C/S environment.
    My need is a button on a Web Form to dynamically insert data from 8i server into an Excel "template" spreadsheet, then open the spreadsheet on the client. The user can then manipulate data in the spreadsheet. A button in the spreadsheet to synchronize the spreadsheet changes back to the 8i server and exit the spreadsheet and return to the Web Form.
    Forms Server 6i is running on Solaris 2.6
    Any ideas on techniques to do this?
    Can Oracle COM Automation or Oracle Objects for OLE (OO4O) do the dynamic inserting of data into the excel template spreadsheet? (I don't know the difference between these??)
    I know web.show_document can be used with a URL to the spreadsheet on the web server (IIS) and the MIME type will launch excel on the client and copy the file to the client.
    How then can I get the updated cells back into 8i from the spreadsheet?

    Magesh,
    the issue of a SSO protected form showing the logon dialog is a knwon issue for Windows200 and the Oracle9iAS base release. If you applied Forms Patch 1 then this should be solved. Hope that I am right in that you are using Oracle9iAS and not Oracle9iDS. Do you see the Single Sign-On logon screen or the Forms logon dialog directly? Check the forms90.conf file in teh forms90/server directory as this contains the Form sso settings (mod_osso) which by default is commented out and therefore inactive. You need to remove the commenting '#' characters and make sure that each sentence having a '#' in front, after that starts on a new line.
    The Forms deployment documentation within the Oracle9iAS docu provides this information too.
    Frank

  • Ftree package in Forms 9i

    In 6i you only have the ability to check if a tree element was selected or deselectd. You cannot check for right mouse click to set a popup menu. You cannot check fo BOTH selected/deselected and double mouse click. Very sad implementation.
    Has the ftree package improved in 9i?
    TIA,
    Ed.

    In forms 6i when you are in the WHEN-TREE-NODE-SELECTED trigger you cannot check if the mouse was double clicked because WHEN-TREE-NODE-SELECTED fires first (hence all you know is the node was selected). You can get to the WHEN-MOUSE-DOUBLE-CLICKED if you double click with the right mouse button but sadly WHEN-TREE-NODE-SELECTED require the left mouse button so a right mouse double click never fires the WHEN-TREE-NODE-SELECTED. Further, there is no event in 6i that allows you to fire the WHEN-TREE-NODE-SELECTED trigger (per Oracle documentation and many Metallink posts).
    In 6i you can assign a pop-up menu to the entire tree object but not to a specific node.

  • How to use stored package in form.

    hi
    i created the following package but now i want to use the following code in form
    how could i use?.
    create or replace package body mahi
    is
    -- Write a MIME header
    procedure write_mime_header (
    p_conn in out nocopy utl_smtp.connection
    , p_name in varchar2
    , p_value in varchar2
    is
    begin
    utl_smtp.write_data ( p_conn
    , p_name || ': ' || p_value || utl_tcp.crlf
    end;
    procedure mail (
    p_sender in varchar2
    , p_recipient in varchar2
    , p_subject in varchar2
    , p_message in varchar2
    is
    v_nls_charset VARCHAR2(50);
    /*LOB operation related varriables */
    v_src_loc BFILE := BFILENAME('BACKUP', 'Logon.jpg');
    l_buffer RAW(54);
    l_amount BINARY_INTEGER := 54;
    l_pos INTEGER := 1;
    l_blob BLOB := EMPTY_BLOB;
    l_blob_len INTEGER;
    v_amount INTEGER;
    /*UTL_SMTP related varriavles. */
    v_connection_handle UTL_SMTP.CONNECTION;
    v_from_email_address VARCHAR2(30) := [email protected]';
    v_to_email_address VARCHAR2(30) := '[email protected]';
    I have used stunnel to send mail using smtp.gmail.com
    To get stunnel see http://stunnel.org/.
    The ORIGINAL idea is here :
    http://monkeyonoracle.blogspot.com/2009/11/plsql-and-gmail-or-utlsmtp-with-ssl.html
    v_smtp_host VARCHAR2(30) := 'localhost.localdomain';
    v_subject VARCHAR2(30) := 'Your Test Mail';
    l_message VARCHAR2(200) := 'This is test mail using UTL_SMTP';
    /* This send_header procedure is written in the documentation */
    PROCEDURE send_header(pi_name IN VARCHAR2, pi_header IN VARCHAR2) AS
    BEGIN
    UTL_SMTP.WRITE_DATA(v_connection_handle,
    pi_name || ': ' || pi_header || UTL_TCP.CRLF);
    END;
    BEGIN
    SELECT value
    INTO v_nls_charset
    FROM nls_database_parameters
    WHERE parameter = 'NLS_CHARACTERSET';
    /*Preparing the LOB from file for attachment. */
    DBMS_LOB.OPEN(v_src_loc, DBMS_LOB.LOB_READONLY); --Read the file
    DBMS_LOB.CREATETEMPORARY(l_blob, TRUE); --Create temporary LOB to store the file.
    v_amount := DBMS_LOB.GETLENGTH(v_src_loc); --Amount to store.
    DBMS_LOB.LOADFROMFILE(l_blob, v_src_loc, v_amount); -- Loading from file into temporary LOB
    l_blob_len := DBMS_LOB.getlength(l_blob);
    /*UTL_SMTP related coding. */
    v_connection_handle := UTL_SMTP.OPEN_CONNECTION(host => v_smtp_host,
    port => 1925);
    UTL_SMTP.EHLO(v_connection_handle, 'gmail.com');
    UTL_SMTP.COMMAND(v_connection_handle, 'auth login');
    UTL_SMTP.COMMAND(v_connection_handle,
    UTL_ENCODE.TEXT_ENCODE('[email protected]',
    v_nls_charset,
    1));
    UTL_SMTP.COMMAND(v_connection_handle,
    UTL_ENCODE.TEXT_ENCODE('xxxxx', v_nls_charset, 1));
    --UTL_SMTP.MAIL(v_connection_handle, v_from_email_address);
    --UTL_SMTP.RCPT(v_connection_handle, v_to_email_address);
    UTL_SMTP.COMMAND(v_connection_handle,
    'MAIL FROM: <'>');
    UTL_SMTP.COMMAND(v_connection_handle,
    'RCPT TO: <'>');
    UTL_SMTP.OPEN_DATA(v_connection_handle);
    send_header('From', '"Sender" <'>');
    send_header('To', '"Recipient" <'>');
    send_header('Subject', v_subject);
    --MIME header.
    UTL_SMTP.WRITE_DATA(v_connection_handle,
    'MIME-Version: 1.0' || UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle,
    'Content-Type: multipart/mixed; ' || UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle,
    ' boundary= "' || 'BACKUP.SECBOUND' || '"' ||
    UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
    -- Mail Body
    UTL_SMTP.WRITE_DATA(v_connection_handle,
    '--' || 'BACKUP.SECBOUND' || UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle,
    'Content-Type: text/plain;' || UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle,
    ' charset=US-ASCII' || UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle, l_message || UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
    -- Mail Attachment
    UTL_SMTP.WRITE_DATA(v_connection_handle,
    '--' || 'BACKUP.SECBOUND' || UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle,
    'Content-Type: application/octet-stream' ||
    UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle,
    'Content-Disposition: attachment; ' || UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle,
    ' filename="' || 'Logon.jpg' || '"' || --My filename
    UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle,
    'Content-Transfer-Encoding: base64' || UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
    /* Writing the BLOL in chunks */
    WHILE l_pos < l_blob_len LOOP
    DBMS_LOB.READ(l_blob, l_amount, l_pos, l_buffer);
    UTL_SMTP.write_raw_data(v_connection_handle,
    UTL_ENCODE.BASE64_ENCODE(l_buffer));
    UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
    l_buffer := NULL;
    l_pos := l_pos + l_amount;
    END LOOP;
    UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
    -- Close Email
    UTL_SMTP.WRITE_DATA(v_connection_handle,
    '--' || 'BACKUP.SECBOUND' || '--' || UTL_TCP.CRLF);
    UTL_SMTP.WRITE_DATA(v_connection_handle,
    UTL_TCP.CRLF || '.' || UTL_TCP.CRLF);
    UTL_SMTP.CLOSE_DATA(v_connection_handle);
    UTL_SMTP.QUIT(v_connection_handle);
    DBMS_LOB.FREETEMPORARY(l_blob);
    DBMS_LOB.FILECLOSE(v_src_loc);
    EXCEPTION
    WHEN OTHERS THEN
    UTL_SMTP.QUIT(v_connection_handle);
    DBMS_LOB.FREETEMPORARY(l_blob);
    DBMS_LOB.FILECLOSE(v_src_loc);
    RAISE;
    END;
    end;
    sarah helped me to create the above package but i am not able to use in form
    i sent email to her but no reply.

    hi
    mehwish............just do for attachment.......
    u can also use something like this...
    Execute send_mail;and also.
    try something like this..
    example:
    begin
    mahi.mail('email address','subject','message','attachment');
    end;Edited by: Sarah on Apr 18, 2011 10:25 AM

Maybe you are looking for