Subject Re: [ib-support] Re: working with blobs in delphi
Author Lele Gaifax
>>>>> On Mon, 28 Jan 2002 08:39:06 +0000 (UTC), helebor@... (Helen Borrie) said:

HB> Lele, At the time I made this comment, it was just wishful
HB> thinking...but... are you writing a UDF in Delphi to attempt
HB> this? i.e. pass a path string as argument to the Delphi
HB> function, have it pick up the file in a TStream and assign
HB> that stream to a blob which it then returns from the UDF
HB> function call for storing in Blob_type 0? Shouldn't that
HB> work?

More or less, yes. But the first cut at it didn't work. Later I will
try you suggestion of using a TStream, since given that I will need
the same UDF coded in C under Linux I chose to use a lower level to
make it easier keep the two in sync.

You mention the Blob_type... how can it be specified? I'm using this
statement to declare the UDF:

DECLARE EXTERNAL FUNCTION foo
CSTRING(128), BLOB
RETURNS PARAMETER 2
ENTRY_POINT 'foo_entry_point' MODULE_NAME 'foo_module_name'

trying to mimic the `string2blob' UDF contained in the fbudf library.
Is there a better way?

thanx&bye,
lele.
--
nickname: Lele Gaifax | Quando vivro' di quello che ho pensato ieri
real: Emanuele Gaifas | comincero' ad aver paura di chi mi copia.
email: lele@... | -- Fortunato Depero, 1929.