?
Solved

Calling a UDF via a Trigger

Posted on 2006-07-19
1
Medium Priority
?
830 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 19

Accepted Solution

by:
NickUpson earned 2000 total points
ID: 17137399
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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
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 …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

743 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