How to obtained raise notice with unidac components:

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
niton_dev
Posts: 20
Joined: Thu 22 Jul 2010 14:44

How to obtained raise notice with unidac components:

Post by niton_dev » Thu 22 Jul 2010 15:02

I would like to know how to I can to obtained message of raise notice using TUniConnection and TUniSQL or TUniQuery components with postgresql 8.4.2. and Codegear Delphi 2007. It's possible?

Example

I have this functions:

CREATE OR REPLACE FUNCTION TEST() RETURNS TRIGGER AS
$BODY$
BEGIN
RAISE NOTICE 'TEST OF RAISE NOTICE';
RETURN NEW;
END;
$BODY$
LANGUAGE 'PLPGSQL';

CREATE TRIGGER TEST_CONSUMER
BEFORE INSERT OR UPDATE
ON CONSUMER
FOR EACH ROW
EXECUTE PROCEDURE TEST();

I need to obtained message of raise notice when I insert or update the consumer table.

Please ignore any errors, if any in postgresql function.

Thanks for help me.

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Mon 26 Jul 2010 09:12

Hello

To get the Notice messages from the PostgreSQL server you should use the OnNotice event of TPgConnection.

hughespa
Posts: 81
Joined: Sat 23 Aug 2008 08:36
Location: W. Australia

Post by hughespa » Mon 26 Jul 2010 12:00

Is there a way to do this with UniDAC components though?

Regards, Paul.

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Mon 26 Jul 2010 14:45

The PostgreSQL notice message is a PostgreSQL feature and is not supported by UniDAC. We plan to implement the possibility of handling warning or notice messages by UniDAC, but it is in the investigating phase only.

hughespa
Posts: 81
Joined: Sat 23 Aug 2008 08:36
Location: W. Australia

Post by hughespa » Tue 27 Jul 2010 02:48

It would be very useful.

Regards, Paul.

Post Reply