[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Firebird Triggers

Posted on 2005-04-15
7
Medium Priority
?
975 Views
Last Modified: 2013-12-09
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?
0
Comment
Question by:sk33v3
  • 4
  • 3
7 Comments
 
LVL 19

Expert Comment

by:NickUpson
ID: 13791640
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
0
 
LVL 9

Author Comment

by:sk33v3
ID: 13791984
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?
0
 
LVL 19

Accepted Solution

by:
NickUpson earned 2000 total points
ID: 13792765
"If we are running the Firebird server on windows we could simply create a DLL and firebird could make calls to the dll?"
thats correct, the dll can be from delphi, C++, etc. The UDF also has to be declared/defined to the database like this

DECLARE EXTERNAL FUNCTION TITLECASE
 CSTRING(256)
  RETURNS CHAR(256) FREE_IT
  ENTRY_POINT 'fn_titlecase'
  MODULE_NAME 'udflocal'

your details will obviously be different.

You also need to configure your database server to tell it what directory path to use for UDF's.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Author Comment

by:sk33v3
ID: 13793681
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.
0
 
LVL 19

Expert Comment

by:NickUpson
ID: 13794533
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
0
 
LVL 9

Author Comment

by:sk33v3
ID: 13795041
Ok got it. Do you know are there any compatibility isues with VB Dll's? or Visual C++ Dll's?
0
 
LVL 19

Expert Comment

by:NickUpson
ID: 13796395
none I know of but test very well, udf's are the most common cause of memory leaks and server crashes
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question