Subject Re[4]: [ib-support] Raising exceptions from a UDF
Author Nando Dessena
Martijn,

MT> ? I don't get this completely... You mean he's trying to use the UDF without
MT> your app? So he is also accessing the database without your app? If so,
MT> why bother?

I'll tell you.
That UDF relies on filling a memory cache with values from the database;
if the cache isn't filled one can't use the UDF reliably, so I have raised
an exception to cater for the (unlikely) case.

My client applications will all call a SP on connect that fills that
memory cache, so whatever you do in those applications the UDF will
work reliably. I am trying to cover the case in which someone accesses
the database and calls the UDF without first calling the SP that fills
the cache. Heck, I *do* have it covered, just wanted to raise a less
obscure error.
If I had OnConnect triggers, or could install a sentinel
app on the server I wouldn't be doing all this mess, but unfortunately
I haven't and can't. :-(

Of course I welcome any better ideas to do what I need to do.
Ciao
--
Nando mailto:nandod@...