Creating a Trigger

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Jan 4 11:07:23 CST 2009


On 1/4/09 6:37 PM, "Beatrix Willius" <bwillius at gmx.de> wrote:

Hi Beatrix, 

> I¹m trying to create a trigger without any success so far. The
> database has a table called Mailbox with a field called MailboxPath.
> The table contains path data like the following:
> 
> aaaa
> aaaa:test
> aaaa:test:ssss
> aaaa:test:xxxxx
> xxxx:xxxx
> yyyy
> 
> If I change the row aaaa:test into aaaa:something in my app I would
> like to change in all the children rows the data, too, and do this
> with a trigger. After reading about the triggers in the Wiki I came
> up with a first try
> 
> create trigger MailboxnameChange
> after update
> on Mailbox
> for each row
> referencing New as NewRow Old as OldRow
> set @NewValue = NewRow.MailboxPath
> begin
> newRow.MailboxPath = Replace(OldRow.MailboxPath, @NewValue)
> end;
> 
> This, however, only gives a kernel error 71000, which isn¹t even in
> the error list or I'm blind. Even a quite simple trigger like

This is PARSER ERROR as I remember
Probably syntax error somewhere

I will ask Ivan to check it


> create trigger MailboxnameChange after update on Mailbox
> begin
> end;
> 
> gives the same error. What am I doing wrong?
> 
> Is what I want to do possible with a trigger? If yes, how?

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list