Solved

Calling a UDF via a Trigger

Posted on 2006-07-19
1
799 Views
Last Modified: 2013-12-09
Hi

I have installed a UDF dll on my firebird database, however i am unsure how to call it.

The UDF creates a text file to a location, and is called FILE_WRITE:

DECLARE EXTERNAL FUNCTION FILE_WRITE
    CSTRING (1024),
    CSTRING (1024)
    RETURNS INTEGER BY VALUE
    ENTRY_POINT 'File_write' MODULE_NAME 'udf_file.dll';


Could someone please advise on the syntax of calling a UDF via a trigger please?

Many thanks
0
Comment
Question by:seancurt
1 Comment
 
LVL 19

Accepted Solution

by:
NickUpson earned 500 total points
Comment Utility
without knowing the meaning of the args it's a little difficult to do a good example but you treat any udf as if it were a built-in function like lower

e.g.

int return_val;
select file_write('path_of_file', 'value to add to file') from rdb$database into :return_val;
if (return_val <> 0) then
 do_something about failure;


rdb$database always has only one row
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now