[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Calling a UDF via a Trigger

Posted on 2006-07-19
1
Medium Priority
?
839 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

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.
In this article, I’ll look at how you can use a backup to start a secondary instance for MongoDB.
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 Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

649 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