Subject How does SQLERROR work in a Stored Procedure
Author Alan J Davies
Thanks Dimitry Sibiryakov.-
That was exactly what I wanted and works well.

Also thanks to Martijn Tonies for giving me details of the Language
reference -
Language Reference, chapter 3, Procedures and Triggers:
that was excellent advice and has resolved questions that I planned to post
here

I have one remaining question about using my own exception messages. When I
get an error message within Delphi (and in isql) I get a 2 line message
like:

exception 8 // this is the RDB$EXCEPTIONS \ RDB$EXCEPTIONS_NUMBER in the
database
Cannot Insert Part # - Already on File // My own message

Is it possible to suppress the first line?

On 22 Feb 2002 at 2:46, Alan J Davies wrote:

Your procedure should look like that:

> CREATE PROCEDURE PARTNO_INSERT
> (
> PART_NMBR CHAR(16) /* New Part # */
> )
> AS
> Begin /* Partno is
Unique
> - Index exists and works ok */
> Insert into Partnos(Partno) /* Create New Part */
> Values (:Part_Nmbr); /* New Part # */

When SQLCode -803 Do
Exception InsertPart;

> end