db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Nabbefeld <Peter.Nabbef...@gmx.de>
Subject Re: Using triggers and procedures?
Date Tue, 31 May 2005 05:58:34 GMT
Jean T. Anderson schrieb:
> A trigger can't call a procedure, but it can call a user-defined sql 
> function.
> 
> Could you provide a few more specifics about what your method needs to do?
> 
I just want to give a feedback to my app, if the number of records in 
the database has changed (independently if I use the embedded db or not).

I've now created a function using
CREATE FUNCTION APPBUT_USER.TRIGGER_RESIZE(SCHEMA_NAME VARCHAR(255), 
TABLE_NAME VARCHAR(255)) RETURNS INTEGER LANGUAGE JAVA PARAMETER STYLE 
JAVA READS SQL DATA EXTERNAL NAME 'myFunc'

How can I use this function in a trigger? I'm always getting syntax errors.

Kind regards

Peter Nabbefeld


>  -jean
> 
> Peter Nabbefeld wrote:
> 
>>
>> Hello,
>>
>> I want a procedure to be called when a record is added or deleted. 
>> However, Derby doesn't support it, and will not in 10.1 (aacording to 
>> the manual).
>>
>> 1. Is there a workaround for this? I want to call some static Java 
>> method.
>>
>> 2. When will that be supported?
>>
>> Kind regards
>>
>> Peter Nabbefeld
>>
> 
> 


Mime
View raw message