Subject Re: interacting with the DB from a UDF
Author samcarleton
As of right now, I don't have a problem that requires such interaction. Earlier today it was an issue of formatting about a thousand rows in a flat string for the client.

I was looking into the UDF solution and came to realize that no connection/transaction context is accessible from the UDF and assumed what you validated, it cannot be done. Meanwhile another developer found a way to achieve the same results with coalesce.

Thank you for confirming what I had assumed.

Sam

--- In firebird-support@yahoogroups.com, Doug Chamberlin <dougchamberlin@...> wrote:
>
> On 9/9/2010 1:22 PM, samcarleton wrote:
> > Is there a way to interact with the DB from a UDF (select, insert, update, or delete)? I am not seeing a way to get the current transaction or any type of connection to preform that type of action on the DB.
>
> This question comes up every few months like clockwork.
>
> The general answer is "Don't even think about doing this!" because the
> UDF execution context is not at all suitable.
>
> What's the problem you are trying to solve?
>
> --
> Cheers! Doug C.
> --
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>