Sending LOB to procedure

Is there any possibility how to send BLOB parameter to PL/SQL procedure from OCI
The following PL/SQL code is working
connect test_user1/test_user1;
drop table test_tab;
create table test_tab (f1 integer, f2 blob);
create or replace procedure test_blob(p_blob in blob) as
begin
     insert into test_tab (f1, f2) values (1, p_blob);
end;
grant execute on test_blob to test_user2;
connect test_user2/test_user2;
declare
     t_blob blob;
     buffer raw(20000) := '';
begin
     for i in 1..1000 loop
          buffer := buffer || hextoraw(i mod 256);
     end loop;
     dbms_lob.createtemporary(t_blob,true);
     dbms_lob.open(t_blob, dbms_lob.lob_readwrite);
     dbms_lob.Writeappend(t_blob, 1000, buffer);
     dbms_lob.Close(t_blob);
     pdm.test_blob(t_blob);
end;
Operations made by user2 I would like to execute from within the C/C++ code (using OCI)
But when I execute this code fragment:
connection.CreateTemporaryBlob(tblob);
connection.OpenLob(tblob);
connection.WriteToLob(tblob, buffer, 8000);
connection.CloseLob(tblob);
const char *insert_sql = "begin user1.test_tab_ins(:1); end;";
if (connection.PrepareStatement(stmthp, insert_sql))
if (connection.BindInputVariable(stmthp, &blob_desc, 1, tblob, 0, SQLT_BLOB))
connection.ExecuteStatement(stmthp);
connection.FreeHandle(stmthp, OCI_HTYPE_STMT);
program crash in the ExecuteStatement

I have found the best way to provide data for a LOB operation is to bind the data as SQLT_LNG and let the OCI take care of the translation for you.
HTH,
Ken

Similar Messages

  • JDBC Sender MSSQL Stored Procedure - Multiple Select Statements

    Hello all,
    I will proceed to tell you my problem, for which solution I request your kind advice:
    Im working in a project for a retailer, which consists in sending the information from erp and sql server to pos thru XI interfaces.
    One of the interfaces is about sending items from sql server to a file so the pos can load it into the system. For doing so I have devloped an stored procedure which function is to return several select statements as many stores the retailer might have, so they can have a different file per store along with its corresponding items in it. 
    The thing is that XI just gets the first select statement and creates the corresponding file, but it seems to ignore the remaining responses as I'm neither getting any file nor an error afterwards.
    So, my question is: is XI capable of handling multiple select responses from an Stored Procedure in graphical mapping??? Or am I just wasting my time trying?
    Thanks in advice for your help.
    Regards.

    Hello Ramkumar,
    After 5 days trying, I finally made it work out applying your advice. Below the short explanation of what I did:
    My Source structure is: Main Node->Row->Records (Material Number, StoreNum, Price, Status)
    My Target structure is: Main Node->File Node->Record Node->Records ( Material Number, Price, Status)
    The key was to make all the occurrences happen against StoreNum node. So, based on what you adviced these two where the key mappings:
    1) The Mapping that will create a new file for each different store that comes in the query (In my case, query was already sort by store using an sql "order by" function, if not you can also use xi node function "sort" as Ramkumar suggested)
    StoreNum->RemoveContext->SplitbyValue (Value Changed)->Collapse Contexts->File Node
    2) The Mapping that will create each record in its corresponding store file:
    StoreNum->RemoveContext->SplitbyValue (Value Changed)->Record Node
    And Voilá !!! It worked.
    Thanks very much Ramkumar.
    Regards.

  • JDBC Sender With Stored Procedure & Context Handeling

    Hi All,
    In my scenario i am using stored Procedure in JDBC sender adapter for Fetching data,
    I am fetching data from 3 tables kepping a one key element Exampkle  <matnr> for each value in this <matnt> in table 1 i will fetch the corresponding records in table 2 and 3 ...
    how can i use context in mapping such a sender structure to hendle the emplty value ...give me some idea...
    if any one has come across such situation plz help me ....it very urgent .
    thanks
    Shakif

    Hi,
    Follow this
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    JDBC adapter
    /people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter
    stored procedure
    /people/sriram.vasudevan3/blog/2005/02/14/calling-stored-procs-in-maxdb-using-sap-xi
    Helpful link
    http://help.sap.com/saphelp_nw04/helpdata/en/45/023c41325fa831e10000000a1550b0/frameset.htm
    Might help you..
    vasanth.

  • JDBC Sender - Oracle Stored procedures

    hi all
    i am working on JDBC sender - File receiver
    I am fetching data from Oracle database
    if i write select query directly in sender adapter the scenario is working properly but when try to write stored procedure in oracle and use execute statement in JDBC, adapter is throwing error.
    As in oracle to fetch multiple rows i have to use cursors .
    i read lot of articles in forum but still not clear on following issues :can any one solve them?
    1 . To get multiple rows can i write SP without cursors?
    2 . If SP is using cursor do my XI accept it or it only accepts  resultset? in that     case how to write sp.
    thanks & regards
    sheetal

    Sheetal,
    Adding to Jai Shankar's reply, Like pointed out, Oracle Stored Procedures return Cursors and XI sender JDBC adapter expects resultsets and so it is not possible to call Oracle SP's from Sender JDBC adapters.
    But, I have also come across a few recent threads where there have been discussions that this is possible  from SP 16 onwards. I have not been able to check and confirm on this, but, maybe you can check your SP level and see if you are below SP 16 . If yes, definetly not possible. If SP 16, or above, a Quick OSS to SAP should surely give the answer if it is possible or not!
    Do let us know your findings.
    Regards
    Bhavesh

  • Need  to send mail  thro procedure

    Hi ,
    I need to send a mail when a procedure fails .I was trying to use utl_smtp package . i just took a sample code available and was trying to work with it as thi s is first time iam using this package .iam getting a error ora-29278.Could u please tell me what is this error , how correct it .Could u please what are things i would need to write a procedure to send mail

    procedure to mail

  • Error in send port executed procedure in Biztalk and SQL Server

    Hi,
    I have a send port which call the below stored procedure
    USE
    GO
    SET
    ANSI_NULLS
    ON
    GO
    SET
    QUOTED_IDENTIFIER
    ON
    GO
    ALTER
    @ProcessId
    VARCHAR
    (100),
    @FilePath
    we are revieving the Error as below and the send port is getting suspended
    System.Data.SqlClient.SqlException: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 2.
    can anyone just help me with this?

    Begin TRANSACTION
    END TRY
    BEGIN CATCH
    BEGIN
    ROLLBACK TRANSACTION ;
    END
    Exactly, you have a BEGIN TRANSACTION and a ROLLBACK in error case, but no COMMIT at all.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Mail is Not sending thru Apex_mail_send Procedure

    Hi ,
    We have created a Leave application , when i entered the leave request its sending the mail to the approver.
    But its not sending the mail. We thought that mail considered as a SPAM thats the reason the mail server should block the mail.
    Procedure is
    apex_mail.send(
         p_to        => :P111_APPROVE,  ----  approver mail id
         p_from      => :p111_FROM,      ---- default mail id
         p_cc        => :P111_ALT_APPROVER,  --- alternate approver mail id
         p_body      => l_body,        --- body we are declaring in a clob variable
         p_body_html => l_body_html, --- body HTML same as BODY
         p_subj      => :p111_subject); --- Subject
    apex_mail.push_queue(p_smtp_hostname => :P111_HOST,   --- Here passing the HOST address
    p_smtp_portno => :P111_PORT);  --- here PORT address.Can anyone suggestion me how to slove this problem.
    Regards,
    Shan
    Edited by: Shan on 3 Jun, 2010 2:12 PM

    Hi,
    I have passed the host and port number to push queue.
    But when i checked the apex_mail_queue there is no data.
    In apex_mail_log the data and content is there. SMTP error also NULL.
    I am not clear about instance
    My URL is : http://192.168.1.114:7777/pls/apex/
    My Host address is : 192.168.1.114
    Port Number is: 25
    Pot number is comin from SELECT PORT_NO FROM COM_IP_ADDRESS;
    Regards,
    Shan

  • Apex_mail.send function or procedure?

    All,
    Perhaps I'm just tired an not understanding something, but I'm looking that the apex_mail.send "procedure" in ApEx's internal help, and it's calling the block a procedure. But it has a return value, so it must be a function. Then in the examples I see it used as a stand alone procedure, not a part of an expression. Am I missing something?
    Dan

    Dan,
    Describe the package in SQL*Plus:SQL> desc apex_mail
    PROCEDURE ADD_ATTACHMENT
    Argument Name                  Type                    In/Out Default?
    P_MAIL_ID                      NUMBER                  IN
    P_ATTACHMENT                   BLOB                    IN
    P_FILENAME                     VARCHAR2                IN
    P_MIME_TYPE                    VARCHAR2                IN
    PROCEDURE BACKGROUND
    Argument Name                  Type                    In/Out Default?
    P_ID                           NUMBER                  IN
    P_SMTP_HOSTNAME                VARCHAR2                IN     DEFAULT
    P_SMTP_PORTNO                  VARCHAR2                IN     DEFAULT
    PROCEDURE PUSH_QUEUE
    Argument Name                  Type                    In/Out Default?
    P_SMTP_HOSTNAME                VARCHAR2                IN     DEFAULT
    P_SMTP_PORTNO                  VARCHAR2                IN     DEFAULT
    PROCEDURE PUSH_QUEUE_BACKGROUND
    PROCEDURE SEND
    Argument Name                  Type                    In/Out Default?
    P_TO                           VARCHAR2                IN
    P_FROM                         VARCHAR2                IN
    P_BODY                         VARCHAR2                IN
    P_BODY_HTML                    VARCHAR2                IN     DEFAULT
    P_SUBJ                         VARCHAR2                IN     DEFAULT
    P_CC                           VARCHAR2                IN     DEFAULT
    P_BCC                          VARCHAR2                IN     DEFAULT
    PROCEDURE SEND
    Argument Name                  Type                    In/Out Default?
    P_TO                           VARCHAR2                IN
    P_FROM                         VARCHAR2                IN
    P_BODY                         CLOB                    IN
    P_BODY_HTML                    CLOB                    IN     DEFAULT
    P_SUBJ                         VARCHAR2                IN     DEFAULT
    P_CC                           VARCHAR2                IN     DEFAULT
    P_BCC                          VARCHAR2                IN     DEFAULT
    PROCEDURE SEND
    Argument Name                  Type                    In/Out Default?
    P_TO                           VARCHAR2                IN
    P_FROM                         VARCHAR2                IN
    P_BODY                         VARCHAR2                IN
    P_BODY_HTML                    VARCHAR2                IN     DEFAULT
    P_SUBJ                         VARCHAR2                IN     DEFAULT
    P_CC                           VARCHAR2                IN     DEFAULT
    P_BCC                          VARCHAR2                IN     DEFAULT
    P_REPLYTO                      VARCHAR2                IN
    PROCEDURE SEND
    Argument Name                  Type                    In/Out Default?
    P_TO                           VARCHAR2                IN
    P_FROM                         VARCHAR2                IN
    P_BODY                         CLOB                    IN
    P_BODY_HTML                    CLOB                    IN     DEFAULT
    P_SUBJ                         VARCHAR2                IN     DEFAULT
    P_CC                           VARCHAR2                IN     DEFAULT
    P_BCC                          VARCHAR2                IN     DEFAULT
    P_REPLYTO                      VARCHAR2                IN
    FUNCTION SEND RETURNS NUMBER
    Argument Name                  Type                    In/Out Default?
    P_TO                           VARCHAR2                IN
    P_FROM                         VARCHAR2                IN
    P_BODY                         VARCHAR2                IN
    P_BODY_HTML                    VARCHAR2                IN     DEFAULT
    P_SUBJ                         VARCHAR2                IN     DEFAULT
    P_CC                           VARCHAR2                IN     DEFAULT
    P_BCC                          VARCHAR2                IN     DEFAULT
    FUNCTION SEND RETURNS NUMBER
    Argument Name                  Type                    In/Out Default?
    P_TO                           VARCHAR2                IN
    P_FROM                         VARCHAR2                IN
    P_BODY                         CLOB                    IN
    P_BODY_HTML                    CLOB                    IN     DEFAULT
    P_SUBJ                         VARCHAR2                IN     DEFAULT
    P_CC                           VARCHAR2                IN     DEFAULT
    P_BCC                          VARCHAR2                IN     DEFAULT
    FUNCTION SEND RETURNS NUMBER
    Argument Name                  Type                    In/Out Default?
    P_TO                           VARCHAR2                IN
    P_FROM                         VARCHAR2                IN
    P_BODY                         VARCHAR2                IN
    P_BODY_HTML                    VARCHAR2                IN     DEFAULT
    P_SUBJ                         VARCHAR2                IN     DEFAULT
    P_CC                           VARCHAR2                IN     DEFAULT
    P_BCC                          VARCHAR2                IN     DEFAULT
    P_REPLYTO                      VARCHAR2                IN
    FUNCTION SEND RETURNS NUMBER
    Argument Name                  Type                    In/Out Default?
    P_TO                           VARCHAR2                IN
    P_FROM                         VARCHAR2                IN
    P_BODY                         CLOB                    IN
    P_BODY_HTML                    CLOB                    IN     DEFAULT
    P_SUBJ                         VARCHAR2                IN     DEFAULT
    P_CC                           VARCHAR2                IN     DEFAULT
    P_BCC                          VARCHAR2                IN     DEFAULT
    P_REPLYTO                      VARCHAR2                IN
    SQL>You see both functions and procedures named send. So it depends on how you want to call them.
    Scott

  • How to access the record data send by a procedure

    Hi I have a procedure with below code snippet..
    create package pkg
    type t_rec is recod (id number,id_name varchar2(10));
    type t_data is table of t_rec index by binary_integer;
    act_data t_data;
    procedure return_data is (o_rec out t_data,dept in number,region in number) ;
    create package body pkg
    procedue return_data is (o_rec out t_data,dept in number,region in number) is
    p_cur sys_refcursor;
    l_text varchar2(100);
    indx number:=0;
    begin
    open p_cur for 'select id,id_name from tab1'||l_text';
    loop
    fetch p_cur into o_rec(indx).id,o_rec(indx).id_name;
    exit when p_cur%notfound; --p_cur.count=0 giving error
    dbms_output.put_line('id is '||o_rec(indx).id); ---- 4
    indx:=indx+1;
    end loop;
    close p_cur;
    exception ....
    end pkg;Now ---4 is giving me values when i put value to id and id_name parameter.
    Then i try to fetch the returned value by below code
    DECLARE
    bk_data PKG.T_DATA;
    BEGIN
    PKG.RETURN_DATA(bk_data, 'parameter.pm1', 'parameter.pm2');
    dbms_output.put_line('id is '||bk_data(1).id);
    end;But it is not giving me any data and thowing error " no data found "
    Please help me how i can fetch and se the the data returned by PKG.RETURN_DATA
    Thanks in advance.
    Edited by: bp on May 31, 2012 2:56 PM

    >
    I have corrected my code as below.
    >
    No you haven't. You didn't fix the errors I mentioned.
    Worse you added new lines that have new errors.
    t_data:=&t_data -- i passed 10
    dept :&dept -- ipassd 10You added substitution variables to the package code; those are for sql*plus - not PL/SQL.
    >
    Can ypu please post the sample code that is giving you data for the sample package pkg .
    >
    If you aren't willing to post sample code why should we? The code you posted won't even compile so it can't possibly be the code you are actually using that purportedly has an error.
    exception ....That is invalid code as you undoubtedly know so what does it accomplish by adding it other than making people think your actual code was removed. But that means that the code you removed could have a problem in it that we can't see. And that means we have no hope of finding your problem because we can't see all of the code that might be causing it.
    >
    Please ignore spelling mistakes.
    >
    We can't ignore them if the code you post won't compile with them in it. The word 'procedue' you provided in the original question isn't a spelling mistake; it's because you did not cut & paste your actual code. It means that instead you manually entered text that is not code you are actually using.
    If you really want help with your problem you need to post the code that you are actually using and that is giving you the problem you are reporting.
    >
    l_text varchar2(1000):=null; -- i have built some dynamic whee clause in this variable
    >
    But are you using NULL for this value when you run your test? If not then maybe the problem is in the value that you are using. How could we possibly tell when you don't post what you are using?
    Post the code you are actually using. If you can't do that for proprietary reasons then modify it to remove the sensitive code. But the code you post has to be the code you are using and the code that is giving the problem.

  • Send email by procedure

    hi friends
    it's possible to send an email if i don't have a mail server, i mean i just have my personal PC at home
    it's posible to use hotmail or gmail .... to send an email
    any help i appreciated
    thanks & regard

    is this mean i can use this server (hotmila and yahoo) to send an email by this packageNo, I do not think yahoo and hotmail can be used.
    Here are some more examples by the way:
    http://www.oracle-base.com/articles/10g/PlsqlEnhancements10g.php#UTL_MAIL
    Re: maildemo example using UTL_SMTP

  • URL link in send e-mail pl/sql procedure

    I have a send e-mail procedure. I am trying to enclose in the body of the message a URL link with parameters from a form, but it is only taking part of it.
    for example http://my.link&pid='||pid||'&uid'||uid
    it only takes http://my.link
    What is the way to do it successfuly?
    Thanks,

    Thanks for your replies. I still did not get it to work. For example if I stick to your solution with :
    urlname := 'my.link?pid='||pid||'&uid='||uid;
    where should I stick the try this?
    I am using a variable called message.
    'message: ' 'click on the following link' ||CRLF || urlname
    This is is not working. Any clues? Thanks a lot. Jeanne

  • I need to interface SCC-TC02 with help of SC 2345 and PCI-6024E DAQ Card.please tell me the procedure and if possible send me the program

    Dear Friends,
               I need to interface SCC-TC02 with help of SC 2345 and PCI-6024E DAQ Card.But i can not understand example program.please send me the procedure to interface these three componnets and if possible send me the program.
    With Regards,
    Eswaramoorthy K V

    nce of nth triggering pulse. i need to know when the when the ist trigger occurs and when the nth trigger occurs . please tell me how to to . what i know is that event triggering has to be done with start and stop trigger. please tell me how it has to doneSuresh;
    What you will need to do is to set up a digital start and stop triggered Analog Input acquisition. Then you will need to have a counter set as event counter, having the specific number of pulses you need configured as the preset value, configured to count down, and generating a pulse after the terminal count has been reached. That counter output will be the stop trigger of the Analog Input operation. In summary, you will have the external pulse being both the digital trigger of the Analog Input operation and the source pin of the counter, and the counter output being the digital stop signal for the analog input.
    I'm attaching a Labview VI that does the start and stop analog input acquisition. You will need to include the counter part and set the stop s
    ignal to be the counter output.
    Hope this helps.
    Filipe
    Attachments:
    AI_Start-Stop_D-Trig.zip ‏25 KB

  • Procedure for inwarding and sending materials if i am a sub-contractor

    Dear friends,
    We are doing job work for our customers. They are also having SAP, so that they are sending the child material through MB1B - 541 mov and receiving the finished goods throug GR against the PO placed on us.
    Now my query is how can i inward the child material inside of our organization and how can i send the finished part to my customer.
    Inward the chils part > Converting to finished part (Activity to be captured)> Send it to customer through invoice.
    What is the SAP standard procedure for the above process..
    Kindly send the actual procedures and what is process you are following to do sub-contracting operations for customers.
    Regards,
    M.Selvaganesh,

    Is your system is also SAP.?
    When you receive components in system, you need to take to your stock, may be same material no. or different as per your wish.
    Here actually the components are logically stays with the owner as Subcontractors place.
    Upon receipt of finished good, it will be consumed.
    So both are stand alone system.

  • ORA-22922: nonexistent LOB value

    hi, we are working With orascle stream in 11.2.0.4 database version.
    and we use  DML  HANDLER for a table that contain CLOB, in handler procedure, we store or save LCR into  our table MTAB1, that contain a column with anydata type.
    then we send this LCR to a procedure to get data and we have the error when try:
             v_anydata := pi_lcr.GET_VALUE('new','RESOLUTION_TEXT');
                         rc := v_anydata.GETCLOB(po_clob_resolution);
    if we comment this seccion of the procedure all its ok.
    and if we call procedure to get data directly in handler, its ok..
    1.  STAGE A -- ERROR
    source                                                      TARGET                                                                           send LCR to procedure
    CAPTURE LCR ---> PROPAGATE---->  APPLY -->DML HANDLER--->Save LCR into a TABLE X ----->CALL_GET_DATA  
    STAGE B -- OK
    source                                                      TARGET                            send LCR to procedure
    CAPTURE LCR ---> PROPAGATE---->  APPLY -->DML HANDLER--->CALL_GET_DATA  
    please your help to solve the issue
    regards:

    THis question would be better placed in the general database forum, this forum is used for multimedia support in the database, adn we do use lobs, but are not recovery experts.

  • Oracle Send Mail Authentication

    Hi,
    After we transferred our mail system to office365 version i got below error.
    Do you know how to authenticate in the oracle send mail function.
    Also i send my html_email procedure.
    ERROR:
    html_email(
    p_to => '[email protected]',
    p_to2 => '[email protected]',
    p_to3 => '[email protected]',
    p_to4 => '[email protected]',
    p_to5 => '[email protected]',
    p_from => '[email protected]',
    p_subject => XYZ,
    p_text => '1',
    p_html => l_body,
    p_smtp_hostname => 'smtp.office365.com',
    p_smtp_portnum => '25');
    ORA-29279: SMTP error: 530 5.7.1 Client was not authenticated+
    MY HTML_EMAIL PROCEDURE:
    create or replace
    procedure html_email(
    p_to in varchar2,
    p_to2 in varchar2,
    p_to3 in varchar2,
    p_to4 in varchar2,
    p_to5 in varchar2,
    p_from in varchar2,
    p_subject in varchar2,
    p_text in varchar2 default null,
    p_html in varchar2 default null,
    p_smtp_hostname in varchar2,
    p_smtp_portnum in varchar2)
    is
    l_boundary varchar2(255) default 'a1b2c3d4e3f2g1';
    l_connection utl_smtp.connection;
    l_body_html clob := empty_clob; --This LOB will be the email message
    l_offset number;
    l_ammount number;
    l_temp varchar2(32767) default null;
    begin
    l_connection := utl_smtp.open_connection( p_smtp_hostname, p_smtp_portnum );
    utl_smtp.helo( l_connection, p_smtp_hostname );
    utl_smtp.mail( l_connection, p_from );
    utl_smtp.rcpt( l_connection, p_to );
    utl_smtp.rcpt( l_connection, p_to2 );
    utl_smtp.rcpt( l_connection, p_to3 );
    utl_smtp.rcpt( l_connection, p_to4 );
    utl_smtp.rcpt( l_connection, p_to5 );
    l_temp := l_temp || 'MIME-Version: 1.0' || chr(13) || chr(10);
    l_temp := l_temp || 'To: ' || p_to || chr(13) || chr(10) ;
    --||';'|| p_to2 || chr(13) || chr(10) ||';'|| p_to3 || chr(13) || chr(10) ||';'|| p_to4 || chr(13) || chr(10) ||';'|| p_to5 || chr(13) || chr(10) ||';'|| p_to6 || chr(13) || chr(10);
    l_temp := l_temp || 'To: ' || p_to2 || chr(13) || chr(10);
    l_temp := l_temp || 'To: ' || p_to3 || chr(13) || chr(10);
    l_temp := l_temp || 'To: ' || p_to4 || chr(13) || chr(10);
    l_temp := l_temp || 'To: ' || p_to5 || chr(13) || chr(10);
    l_temp := l_temp || 'From: ' || p_from || chr(13) || chr(10);
    l_temp := l_temp || 'Subject: ' || p_subject || chr(13) || chr(10);
    l_temp := l_temp || 'Reply-To: ' || p_from || chr(13) || chr(10);
    l_temp := l_temp || 'Content-Type: multipart/alternative; boundary=' ||
    chr(34) || l_boundary || chr(34) || chr(13) ||
    chr(10);
    -- Write the headers
    dbms_lob.createtemporary( l_body_html, false, 10 );
    dbms_lob.write(l_body_html,length(l_temp),1,l_temp);
    -- Write the text boundary
    l_offset := dbms_lob.getlength(l_body_html) + 1;
    l_temp := '--' || l_boundary || chr(13)||chr(10);
    l_temp := l_temp || 'content-type: text/plain; charset=us-ascii' ||
    chr(13) || chr(10) || chr(13) || chr(10);
    dbms_lob.write(l_body_html,length(l_temp),l_offset,l_temp);
    -- Write the plain text portion of the email
    l_offset := dbms_lob.getlength(l_body_html) + 1;
    dbms_lob.write(l_body_html,length(p_text),l_offset,p_text);
    -- Write the HTML boundary
    l_temp := chr(13)||chr(10)||chr(13)||chr(10)||'--' || l_boundary ||
    chr(13) || chr(10);
    l_temp := l_temp || 'content-type: text/html;' ||
    chr(13) || chr(10) || chr(13) || chr(10);
    l_offset := dbms_lob.getlength(l_body_html) + 1;
    dbms_lob.write(l_body_html,length(l_temp),l_offset,l_temp);
    -- Write the HTML portion of the message
    l_offset := dbms_lob.getlength(l_body_html) + 1;
    dbms_lob.write(l_body_html,length(p_html),l_offset,p_html);
    -- Write the final html boundary
    l_temp := chr(13) || chr(10) || '--' || l_boundary || '--' || chr(13);
    l_offset := dbms_lob.getlength(l_body_html) + 1;
    dbms_lob.write(l_body_html,length(l_temp),l_offset,l_temp);
    -- Send the email in 1900 byte chunks to UTL_SMTP
    l_offset := 1;
    l_ammount := 1900;
    utl_smtp.open_data(l_connection);
    while l_offset < dbms_lob.getlength(l_body_html) loop
    utl_smtp.write_data(l_connection,
    dbms_lob.substr(l_body_html,l_ammount,l_offset));
    l_offset := l_offset + l_ammount ;
    l_ammount := least(1900,dbms_lob.getlength(l_body_html) - l_ammount);
    end loop;
    utl_smtp.close_data(l_connection);
    utl_smtp.quit( l_connection );
    dbms_lob.freetemporary(l_body_html);
    end;
    Edited by: user7987260 on Jun 2, 2013 6:25 AM

    What do you not understand, or what does not work for, with regards to the UTL_SMTP.AUTH function?

Maybe you are looking for

  • Who will now support UK Vodafone peeps?

    I've just come across this on the Vodafone forum http://forum.vodafone.co.uk/topic/64707-nokia-n900-are-vodafone-still-offering-this-through-insuranc... Why do Nokia allow vodafone to do this to there handsets!!

  • Two problems : navigating the timeline and know where your shot matching originates

    Hello, - I wonder how you can navigate the timeline freely (I'm on PC in direct link mode) to be able to use, for example, the C shortcut easily when you edit a one hour film. In a word, I can't find how I can zoom on the secondary playhead instead o

  • Export pictures not working

    I have pics in a .pdf that I'm trying to export. It runs thru the process, the files are in the folder & look like the right size (around 1 MB each), but there's no image. Any help is appreciated.

  • ITunes wireless sync and Remote App not working in in unison.

    I'm running iTunes on a Windows 8 machine, and I'm having issues getting both these above mentioned applications working together. I did have some issues in the beginning with setting up wireless sync for my iPhone, but these were fixed by restarting

  • BI publisher installation into Oracle Express Edition

    Hi, i need help on BI publisher installation. When i install BI publisher into oracle Express edition 10.2.1.0 version. i chosen ADVANCED type it shows Please enter 10.3.1.0 ver or later ORACLE_HOME path... if i choose BASIC type it shows error at 99