Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 10 total
Thread Determining the size of a record's Blob
Sun, Mar 26 2006 5:15 AMPermanent Link

Steve Forbes

Team Elevate Team Elevate

Hi Tim,

Is there any easy way of determining the size of the content of a blob
column (containing binary data) other than creating a blobstream and seeking
the end position. Ideally I would like a corollary of the SQL LENGTH
function but for blobs .. SIZEOF maybe?
--
Best regards

Steve

Sun, Mar 26 2006 5:21 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Steve

I use memo fields for everything and then its just Length(fieldname.AsString). If you want it in SQL I think its even easier - its always 10 Smiley


Roy Lambert
Sun, Mar 26 2006 6:10 AMPermanent Link

Steve Forbes

Team Elevate Team Elevate

Hi Roy,

Thanks for the reply, .. yup, I knew about LENGTH for memo columns Wink

I am wanting a function (or some quick method) that works with binary blob
columns.

--
Best regards

Steve

"Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message
news:9A6352FD-A303-4828-A53F-20859A821295@news.elevatesoft.com...
> Steve
>
> I use memo fields for everything and then its just
> Length(fieldname.AsString). If you want it in SQL I think its even
> easier - its always 10 Smiley
>
>
> Roy Lambert
>

Sun, Mar 26 2006 11:48 AMPermanent Link

Michael Baytalsky


> Thanks for the reply, .. yup, I knew about LENGTH for memo columns Wink
You do realize, that this will actually read the whole Memo into
memory, right?

> I am wanting a function (or some quick method) that works with binary blob
> columns.
Why not create a blob stream and call its Size property (same
true for memos)? Hopefully, that won't require reading up the
content.


Regards,
Michael
Sun, Mar 26 2006 3:27 PMPermanent Link

"Mike Shkolnik"
> You do realize, that this will actually read the whole Memo into
> memory, right?
You're not right - the header block for every BLOB value contains the total
count of stored memo.
This is for DBISAM and Paradox formats

--
With best regards, Mike Shkolnik
E-mail: mshkolnik@scalabium.com
WEB: http://www.scalabium.com

Sun, Mar 26 2006 3:36 PMPermanent Link

Steve Forbes

Team Elevate Team Elevate

Hi Mike,

Thanks for your reply.

> Why not create a blob stream and call its Size property (same
> true for memos)? Hopefully, that won't require reading up the
> content.

I know I can do that, I just wanted to find out whether there is any
shorthand way of determining the size of a blob.

--
Best regards

Steve

"Michael Baytalsky" <mike@contextsoft.com> wrote in message
news:7E23C4EE-303D-468A-B73E-4CB6F8E26D5B@news.elevatesoft.com...
>
>
>> Thanks for the reply, .. yup, I knew about LENGTH for memo columns Wink
> You do realize, that this will actually read the whole Memo into
> memory, right?
>
>> I am wanting a function (or some quick method) that works with binary
>> blob columns.
> Why not create a blob stream and call its Size property (same
> true for memos)? Hopefully, that won't require reading up the
> content.
>
>
> Regards,
> Michael

Sun, Mar 26 2006 7:02 PMPermanent Link

Bill Edwards
TBlobField(Whatever).BlobSize ?
Sun, Mar 26 2006 8:13 PMPermanent Link

Steve Forbes

Team Elevate Team Elevate

Hi Bill,

Thanks for your post .. I am *REALLY* embarassed now! And thanks for not
telling me to RTFM Wink

I would still like to see an SQL function that returns the same value (I'm
an SQL-kinda guy) ... Tim?
--
Best regards

Steve

"Bill Edwards" <sdbgrump@hotmail.com> wrote in message
news:088CC9EA-10A6-419B-A7DA-191C0BDC6529@news.elevatesoft.com...
> TBlobField(Whatever).BlobSize ?
>

Mon, Mar 27 2006 5:57 AMPermanent Link

Michael Baytalsky

>> You do realize, that this will actually read the whole Memo into
>> memory, right?
> You're not right - the header block for every BLOB value contains the total
> count of stored memo.
> This is for DBISAM and Paradox formats
Which means I'm correct suggesting to check Stream.Size property
(which wouldn't read the blob), instead of doing Length(fieldname.AsString)
which will read all the data no matter what.


Michael




> --
> With best regards, Mike Shkolnik
> E-mail: mshkolnik@scalabium.com
> WEB: http://www.scalabium.com
>
>
Mon, Mar 27 2006 3:12 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Steve,

<< Thanks for your post .. I am *REALLY* embarassed now! And thanks for not
telling me to RTFM Wink>>

Actually, the Size property still causes the BLOB to be opened, seeked, and
then freed.  The problem is that this is all handled at the db.pas unit
level, and we have no way to optimize it.

<< I would still like to see an SQL function that returns the same value
(I'm an SQL-kinda guy) ... Tim? >>

That will be available in an upcoming version. Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com

Image