Link to home
Start Free TrialLog in
Avatar of sk33v3
sk33v3

asked on

Firebird Triggers

With SQL Server there is a way to send emails and other cool things is there a way to do this with triggers in EMS? Is there a way maybe to shell out another program?
Avatar of Nick Upson
Nick Upson
Flag of United Kingdom of Great Britain and Northern Ireland image

if you mean from firebird, EMS just gives you a way to administer the database, the only way is to use a User Defined Function (UDF). the udf can then be used in a trigger or stored procedure. The ibphoenix.com site has some libraries
of UDF for download or you can write your own
Avatar of sk33v3
sk33v3

ASKER

Ok so let me make sure I understand properly. If we are running the Firebird server on windows we could simply create a DLL and firebird could make calls to the dll? I tried to find someting on how to make the dll but I found a few resources on how to make an internal UDF. What do I have to do to make the UDF work properly in Firebird?
ASKER CERTIFIED SOLUTION
Avatar of Nick Upson
Nick Upson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sk33v3

ASKER

ok so let me make sure I understnad the declare statement. You have a dll name udflocal That has a function name fn_titlecase in it that returns 256 characters. You then have aliased the call as TITLECASE so in your SQL you just type TITLECASE("Blah"). Correct? Sorry I am very new to firebird so I am just trying to get it straight in my head before I try to make it happen.
almost, my code would do something like

select titlecase(name) from people where ....

it takes a string as argument and returns one, behaving similiar to UPPER which is built-in
Avatar of sk33v3

ASKER

Ok got it. Do you know are there any compatibility isues with VB Dll's? or Visual C++ Dll's?
none I know of but test very well, udf's are the most common cause of memory leaks and server crashes