Subject Display Exception message description raised From SP/Trigger
Author R. S. Patil
Dear Friends,

I have written application using IBO and i am doing data
validation in OnInsert/OnUpdate triggers at database level.
There i have defined no of Exception like following

CREATE EXCEPTION CHEQUE_NOT_ISSUED 'Cheque is not from
Issued Cheque Books'

I wish to show the message in quotes to user if there is
posting error.

i did as follows

try
qry.Post;
except
on E: EIB_ISCError do
begin
(i tried both SQLMessage and ErrorMessage)
desc := E.SQLMessage.Text;// ErrorMessage.Text;
end; // on EI_ISCError
on E: Exception do
begin
desc := E.Message;
end;
end;// try except
showmessage(desc);

but it shows some other message than the exception message.
I checked with sqlMonitor it shows correct exception was
raised.

Can somebody help me in showing the message defined in
exception definition ?

Thanks in advance.

R. S. Patil.