Devart Forum Index

The time now is Thu 09 Sep 2010 04:00

How to obtained raise notice with unidac components:

 
Post new topic   Reply to topic    Devart Forum Index -> Universal Data Access Components
View previous topic :: View next topic  
Author Message
niton_dev



Joined: 22 Jul 2010
Posts: 1

PostPosted: Thu 22 Jul 2010 15:02    Post subject: How to obtained raise notice with unidac components: Reply with quote

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.
Back to top
View user's profile Send private message
bork
Devart Team


Joined: 12 Mar 2010
Posts: 467

PostPosted: Mon 26 Jul 2010 09:12    Post subject: Reply with quote

Hello

To get the Notice messages from the PostgreSQL server you should use the OnNotice event of TPgConnection.
Back to top
View user's profile Send private message
hughespa



Joined: 23 Aug 2008
Posts: 81
Location: W. Australia

PostPosted: Mon 26 Jul 2010 12:00    Post subject: Reply with quote

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

Regards, Paul.
Back to top
View user's profile Send private message
bork
Devart Team


Joined: 12 Mar 2010
Posts: 467

PostPosted: Mon 26 Jul 2010 14:45    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
hughespa



Joined: 23 Aug 2008
Posts: 81
Location: W. Australia

PostPosted: Tue 27 Jul 2010 02:48    Post subject: Reply with quote

It would be very useful.

Regards, Paul.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Devart Forum Index -> Universal Data Access Components All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum