DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: max size of characters in pl/sql

  1. #1
    Join Date
    Jul 2002
    Posts
    228

    max size of characters in pl/sql

    Hi,
    I tried to send in mail (utl_smtp) more 32767 characters but I get error:

    text varchar2(32767);

    I tried also "long" but I get same error

    Exist a datatype more 32767 characters??

    with clob, blob, nlob I get error.


    Thanks
    Raf

  2. #2
    Join Date
    Mar 2001
    Location
    Reading, U.K
    Posts
    598
    try to split ur message into multiple variables... and while sending ur mail do this(msg1 || msg2 || msg3...)
    Cheers!
    OraKid.

  3. #3
    Join Date
    Jul 2002
    Posts
    228
    my procedure is this:

    CREATE OR REPLACE procedure send_mail ( mitt IN varchar2,
    destinatario1 IN varchar2,
    object IN varchar2,
    messagge IN varchar2) IS
    cursor my_cur is
    select text
    from my_tab;
    mailhost varchar2(40):= 'pop3.cxx.yyyyyyyyy';
    conn utl_smtp.connection;
    crlf varchar2(2):=CHR(13)||CHR(10);
    messag long; --varchar2(3000);
    v_mitt varchar2(2000) := mitt;
    BEGIN
    conn := utl_smtp.open_connection (mailhost, 25);
    messag := 'DATE: '||to_char(sysdate, 'dd-mon-yy hh24:mi:ss')||crlf||
    'FROM: <'||mitt||'>'||crlf||
    'SUBJECT: '||object||crlf||
    'TO: '||destinatario1;
    for rec_msg in my_cur
    loop
    messag := messag||chr(10)||rec_msg.text;
    end loop;
    utl_smtp.helo(conn, mailhost);
    utl_smtp.mail (conn, v_mitt);
    utl_smtp.rcpt (conn, destinatario1);
    utl_smtp.data(conn, messag);
    utl_smtp.quit(conn);
    end send_mail;


    How can I do it in my specific example?

    Thanks
    Raf

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width