-
create a speciall trigger error
Hello
I am trying to make a emailudf show in db2mag set 2000 to work with my database.
first i try build a trigger show above
// Create the emailUDF Trigger
public static void
registerTrigger (Connection con) throws Exception
{ try
{ Statement registerStmt = con.createStatement ();
System.out.println (" Registering Java trigger: AC");
registerStmt.executeUpdate (
" CREATE TRIGGER CONTATOS.AC " +
" AFTER INSERT ON CONTATOS " +
" REFERENCING NEW AS N_ROW " +
" FOR EACH ROW MODE DB2SQL " +
" BEGIN ATOMIC " +
" VALUES (EMAILUDF (N_ROW.RECEIVER,
N_ROW.SUBJECT,
N_ROW.MESSAGE) ); " +
" END ");
}.
but when i try this
I receve the same erros outut
----------------------------- Command Entered ------------------------------
// Create the emailUDF Trigger
public static void
registerTrigger (Connection con) throws Exception
{ try
{ Statement registerStmt = con.createStatement () ;
-----------------------------------------------------------------------------
DB21034E The command was processed as an SQL statement because it was not
a valid Command Line Processor command. During SQL processing it returned:
SQL0007N The character "{" following "on) throws Exception" is not valid.
SQLSTATE=42601
Where i am wrong ?
I try this ( http://www.db2mag.com/db_area/archiv...4/cutlip.shtml)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks