Creating a Trigger

Beatrix Willius bwillius at gmx.de
Sun Jan 4 10:37:47 CST 2009


Hi,

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

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?

Mit freundlichen Grüßen/Regards

Trixi Willius

http://www.mothsoftware.com
Mail Archiver X: archive, clean and search email
http://www.beatrixwillius.de
Fractals, 3d landscapes etc.



More information about the Valentina mailing list