Subject | UDF returning incomplete blob |
---|---|
Author | Magno Machado |
Post date | 2008-06-09T21:04:30Z |
I'm writing an UDF that loads a picture from another database and returns it
as an UDF (The UDF return is declared as parameter).
First I dynamicaly alloc a buffer big enough to hold the picture into.
Second, I call PutSegment on the blob to copy the buffer contents inside it,
like this:
MyBlobParam^.PutSegment(MyBlobParam^.BlobHandle, MyBuffer, BufferSize);
But afterall the size of my returned blob is about 9Kb (A bit smaller than
this, actually), while the picture I'm trying to load is very bigger than
this.
I think it's something related to segment size, and I have to read the
buffer in small packets. Am I correct? If so, how can I know the max size of
these 'packets'?
[Non-text portions of this message have been removed]
as an UDF (The UDF return is declared as parameter).
First I dynamicaly alloc a buffer big enough to hold the picture into.
Second, I call PutSegment on the blob to copy the buffer contents inside it,
like this:
MyBlobParam^.PutSegment(MyBlobParam^.BlobHandle, MyBuffer, BufferSize);
But afterall the size of my returned blob is about 9Kb (A bit smaller than
this, actually), while the picture I'm trying to load is very bigger than
this.
I think it's something related to segment size, and I have to read the
buffer in small packets. Am I correct? If so, how can I know the max size of
these 'packets'?
[Non-text portions of this message have been removed]