| View previous topic :: View next topic |
| Author |
Message |
niton_dev
Joined: 22 Jul 2010 Posts: 1
|
Posted: Thu 22 Jul 2010 15:02 Post subject: How to obtained raise notice with unidac components: |
|
|
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 |
|
 |
bork Devart Team
Joined: 12 Mar 2010 Posts: 467
|
Posted: Mon 26 Jul 2010 09:12 Post subject: |
|
|
Hello
To get the Notice messages from the PostgreSQL server you should use the OnNotice event of TPgConnection. |
|
| Back to top |
|
 |
hughespa
Joined: 23 Aug 2008 Posts: 81 Location: W. Australia
|
Posted: Mon 26 Jul 2010 12:00 Post subject: |
|
|
Is there a way to do this with UniDAC components though?
Regards, Paul. |
|
| Back to top |
|
 |
bork Devart Team
Joined: 12 Mar 2010 Posts: 467
|
Posted: Mon 26 Jul 2010 14:45 Post subject: |
|
|
| 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 |
|
 |
hughespa
Joined: 23 Aug 2008 Posts: 81 Location: W. Australia
|
Posted: Tue 27 Jul 2010 02:48 Post subject: |
|
|
It would be very useful.
Regards, Paul. |
|
| Back to top |
|
 |
|