Board index » delphi » How to handle TStoredProc (Stored Procedures) error in Delphi with SQL 6.5

How to handle TStoredProc (Stored Procedures) error in Delphi with SQL 6.5

I have a SQLServer 6.5 and Delphi 4 :

What do I have to do to Send messages from stored procedure to Delphi ?

I'm using RAISERROR at stored procedures, and at Delphi I'm using
TStoredProc in TRY ..EXCEPT clause, but sometimes it doesn't return the
message I've send.

Any Idea ?

Fernando Oliveira
ferna...@morelli.com.br

 

Re:How to handle TStoredProc (Stored Procedures) error in Delphi with SQL 6.5


Hi Fernando!

On Fri, 16 Jul 1999 13:16:51 -0300, "Fernando Francisco de Oliveira"

Quote
<ferna...@morelli.com.br_NOSPAM> wrote:
>What do I have to do to Send messages from stored procedure to Delphi ?

You can not send messages from the stored procedures, but you may
create extended stored procedures in which you can program to send
some information to the client machine in the network by TCP/IP, but
this is not so trivial thing.

Quote
>I'm using RAISERROR at stored procedures, and at Delphi I'm using
>TStoredProc in TRY ..EXCEPT clause, but sometimes it doesn't return the
>message I've send.

raiserror is for raising errors, this fires exception in Delphi that
you catch in except part. Are you saying that some exceptions are not
catched? raiserror has parameters so try seeing in the MS SQL help
whit what parameters you can generate errors.

tomi.

Re:How to handle TStoredProc (Stored Procedures) error in Delphi with SQL 6.5


Fernando Francisco de Oliveira wrote:

Quote

> I have a SQLServer 6.5 and Delphi 4 :

> What do I have to do to Send messages from stored procedure to Delphi ?

> I'm using RAISERROR at stored procedures, and at Delphi I'm using
> TStoredProc in TRY ..EXCEPT clause, but sometimes it doesn't return the
> message I've send.

> Any Idea ?

> Fernando Oliveira
> ferna...@morelli.com.br

I might suggest using a result set of at least one column in the stored
procedure.

In your RAISE ERROR code in SQL, just set that variable to a value
(right before you raise the error) that you can evaluate and lookup in
you Delphi app.

HTH

Rkr

Other Threads