Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 14 total
Thread Reading the size of a blob
Thu, Nov 2 2006 2:35 AMPermanent Link

Is there a SQL option to return the size of a blob?

My idea is to have a blob field (fBlob) and add a size field (fSize).
I'd like to be able to update the size field with the size of the blob.
Is SQL like this possible? :

UPDATE fSize = BLOBSIZE(fBlob)

A single SQL command to update them would save stepping through it and
reading the stream size.

/Matthew Jones/
Thu, Nov 2 2006 5:34 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Matthew


I think I've been here and the answer is no. SQL Length returns the length of the pointer not the length of the field. With V4 you could write a custom function to give the bumph.

Roy Lambert
Thu, Nov 2 2006 6:58 AMPermanent Link

Thanks!

/Matthew Jones/
Thu, Nov 2 2006 10:44 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matt,

<< Is there a SQL option to return the size of a blob? >>

No, but the next 4.x minor version update (not build update) can probably
include one.  EDB allows LENGTH() to work with BLOBs of any kind.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Jul 19 2023 7:48 AMPermanent Link

Danie van Eeden

Hi,
just checking, was this ever implemented?
Or is there perhaps still any pans to do so?

Thx!
Danie
Thu, Jul 20 2023 6:53 AMPermanent Link

Jose Eduardo Helminsky

HPro Informatica

Danie van Eeden wrote:

<<
Hi, just checking, was this ever implemented?  Or is there perhaps still any pans to do so?
>>

I have tested here and the function length worked in the last DBISAM version.

Eduardo
Thu, Jul 20 2023 8:26 AMPermanent Link

Danie van Eeden

mmmm. I must be missing something obvious.
We are running on DBISAM Engine version 4.50 Build 2 (however my DBSYS version is a little older).
I will re-test. Thanks.
Can you perhaps confirm - you are running on Build 6?
Thu, Jul 20 2023 8:26 AMPermanent Link

Danie van Eeden

mmmm. I must be missing something obvious.
We are running on DBISAM Engine version 4.50 Build 2 (however my DBSYS version is a little older).
I will re-test. Thanks.
Can you perhaps confirm - you are running on Build 6?
Fri, Jul 21 2023 1:35 AMPermanent Link

Danie van Eeden

I have tested on

Version 4.50 (4.50 Build 2)
Version 4.50 (4.50 Build 6)

I have a field PICTURE of type BLOB.

SQL: select length(picture) from stock

yields

DBISAM Engine Error # 11949 SQL parsing error - Expected NULL, Memo expression but instead found picture in SELECT SQL statement at line 1, column 15
Fri, Jul 21 2023 6:23 AMPermanent Link

Jose Eduardo Helminsky

HPro Informatica

Danie van Eeden wrote:

<<
DBISAM Engine Error # 11949 SQL parsing error - Expected NULL, Memo expression but instead found picture in SELECT SQL statement at line 1, column 15
>>

Sorry about that. I have tested it with 4.48 build (my current version) and did a test using a MEMO field and not with picture field. Today I tested with a picture but the length is not the size of the picture and maybe Roy was indicated correctly the size returned is the size of pointer (I do not know).

Regards
Eduardo
Page 1 of 2Next Page »
Jump to Page:  1 2
Image