[Oledb-dev] FillDataOffsets, ulColumnSize and bytea columns
Victor Snezhko
snezhko at indorsoft.ru
Sat May 20 16:24:41 UTC 2006
Victor Snezhko <snezhko at indorsoft.ru> writes:
>
>> Victor, can you send me a sample program using bytea? I'll try to figure
>> it out on my machine.
>
> Attached is the sample jscript file which should show you sizes of
> varchar and bytea columns and their values. Unfortunately, it doesn't
> actually show bytea values, I don't know where to fix it (I have also
> attached small Delphi program, on which I tested initially, it shows
> byteas. Just in case you have Delphi at hand :))
Forgot to mention:
You could also experiment with adding the flag DBCOLUMNFLAGS_ISLONG
and reading data with GetChunk. It accepts an integer - the number of
bytes you want to extract, and returns string.
There is more, description of the flag contains excellent disclaimer
allowing us to return whatever we want in ulColumnSize :) See:
=======
Furthermore, when this flag is set, the provider might not be able to
accurately return the maximum length of the BLOB data in ulColumnSize
in the DBCOLUMNINFO structure.
=======
BTW, does PostgreSQL have an ability to accept/give bytea values in
chunks? Without this functionality, too much address space can be
eaten by large files transmitted to postgresql as byteas. I didn't
find any means to avoid this in postgresql docs...
--
WBR, Victor V. Snezhko
E-mail: snezhko at indorsoft.ru
More information about the Oledb-devel
mailing list