Subject Re: [IBO] C++ with IBObjects and Interbase UDF's
Author Geoff Worboys
> I have tried to copy the DLL to all kinds of directories and
> at this point I believe my problem may be with the way that
> the DLL is declared with C++ Builder. There are lots of
> examples with DELPHI and C but I would like to
> be able to do what you have done with C++ Builder.

I could not see what was wrong in the sample code you originally
posted but I do remember have LOTS of trouble when I first started.
From memory, some of it came from the VCL itself - and the
manipulations that BCB does to support it. Since I cannot remember
the details, I think the simplest thing will be to send you a
demonstration to try out, and then you can try to add to it.

I'll cut my UDF DLL back to a demonstration project and send it to you
privately. It still wont be using the VCL, but it will give you
something to start with.


> To answer your question about VCL and IBO. I just put in
> VCL support in order to make things with IBO go smoother
> because I was not sure if it was needed in order to have
> IBO within the DLL. I must have IBO because I need to do
> "array" datatype manipulation from within my SQL database
> and nothing else seems to support this easily.

I have avoided arrays specifically because of Interbase does not
support them within its own SP/Trigger language. Blobs are hard
enough to handle within UDFs, I decided arrays would be just too
difficult.

So my first suggestion would be... Dont use arrays at all - simply
implement the data in a new table. You may like to post a message to
one of the IB specific support groups, as to whether there is really
any performance benefit to be had using arrays over an independant
table (especially since you intend to manipulate the data at the
server, or you would not be worried about UDF support).

Given that you wont like the previous suggestion :-), my next
suggestion is... As soon as you get a UDF working with the VCL/IBO
libraries included, you MUST test it vigorously with as many users and
activity that you can throw at the server! There is so much going on
behind the scenes with the VCL/IBO libraries that you are very
vulnerable to thread saftey issues. You may end up doing a lot of
working only to find spurious errors occuring that you simply cannot
track down.


Geoff Worboys
Telesis Computing