DB2 Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDB2 Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old January 13th, 2006, 12:08 AM
smileee smileee is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2006
Posts: 2 smileee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 10 sec
Reputation Power: 0
Trigger body with a procedure call..

hi,

i ve some doubts regarding the trigger body, kindly clarify me ..

i am not able to use SQLCODE, CURSORS, Procedure calls.. in a trigger body ..

is there any constraints for using this in a trigger...

My DB2 Version is 8.2.0
OS : Windows 2000

Below is the test procedure sp_print called in the trigger,

Code:
CREATE PROCEDURE sp_print

DYNAMIC RESULT SETS 1
LANGUAGE     SQL

BEGIN

	DECLARE   s_temp_cursor CURSOR   WITH HOLD   WITH RETURN TO CLIENT 	
        FOR   
        SELECT * FROM  result_table FOR READ ONLY;

	open s_temp_cursor;

END
@



The trigger trig_test that calls the above procedure,

Code:
CREATE TRIGGER trig_test  AFTER INSERT  ON  test
REFERENCING NEW_TABLE AS INSERTED
FOR EACH STATEMENT
MODE DB2SQL
TRIGR:  BEGIN ATOMIC

	INSERT INTO  result_table VALUES ( 1 ) 	;

	call sp_print;

END
@


Regards
Sn

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDB2 Development > Trigger body with a procedure call..


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway