Re: SQL exception

From: Matt B. <mcb_at_fightspam.sd.znet.com>
Date: Thu, 5 Oct 2000 21:55:36 -0700
Message-ID: <stqmhm287r21ab_at_corp.supernews.com>


"Greg" <actiris_at_loxinfo.co.th> wrote in message news:39DC065D.9178DC1F_at_loxinfo.co.th...
> Have this part of a procedure
>
> exception
> when utl_smtp.transient_error or utl_smtp.permanent_error then
> utl_smtp.quit(c);
> insert into T_MAIL_LOG
> (SENDER,
> ERRORMESSAGE,
> DATE_TIME)
> values
> (Sender,
> sqlerrm,
> sysdate);
>
> 68/8 PLS-00231: function 'SQLERRM' may not be used in SQL
>
> how to bring the error message in to the table
>
> thanks greg

Assign it to a variable and then put the variable into the SQL:

v_errm := SQLERRM;
INSERT INTO...
VALUES(SQLERRM,...) -Matt Received on Fri Oct 06 2000 - 06:55:36 CEST

Original text of this message