BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Determining Blob field size

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Fabio Dalle Ave
Guest





PostPosted: Tue Jul 13, 2004 1:17 pm    Post subject: Determining Blob field size Reply with quote



Hi,
I need to determine the size of the contents of blob fields stored it a
table. I would like to do this server side, without having to loop
through each record, retrieving the content of the blob field and
finding its size (this is *MOST* inefficient, especially in a WAN
environment).
I need both MS SQL Server 2000 and Firebird 1.5 support. Is there any
server function to do that? I guess I could write a delphi UDF for
firebird somehow to do this, but I wouldn't know how to do so in MS SQL
Server.

Thanks for any clue.

Fabio
Back to top
Eric Hill
Guest





PostPosted: Tue Jul 13, 2004 2:50 pm    Post subject: Re: Determining Blob field size Reply with quote



Oracle uses LENGTH(blob_field) to give BLOB size. I'm sure SQL Server and IB have something
similar.

Eric


Back to top
Alain Quesnel
Guest





PostPosted: Tue Jul 13, 2004 3:32 pm    Post subject: Re: Determining Blob field size Reply with quote



Use DATALENGTH() for MSSQL 2000. Returns the size in bytes.

--

Alain Quesnel
[email]alainsansspam (AT) logiquel (DOT) com[/email]

www.logiquel.com


"Fabio Dalle Ave" <fdalleave_no_spam*@softsys.it> wrote

Quote:
Hi,
I need to determine the size of the contents of blob fields stored it a
table. I would like to do this server side, without having to loop
through each record, retrieving the content of the blob field and
finding its size (this is *MOST* inefficient, especially in a WAN
environment).
I need both MS SQL Server 2000 and Firebird 1.5 support. Is there any
server function to do that? I guess I could write a delphi UDF for
firebird somehow to do this, but I wouldn't know how to do so in MS SQL
Server.

Thanks for any clue.

Fabio



Back to top
Fabio Dalle Ave
Guest





PostPosted: Tue Jul 13, 2004 4:25 pm    Post subject: Re: Determining Blob field size Reply with quote

Alain Quesnel wrote:

Quote:
DATALENGTH()

Awesome!!!
Now... if anybody has a clue about Firebird ;)

Thanks guys!!

Back to top
Aage Johansen
Guest





PostPosted: Tue Jul 13, 2004 9:34 pm    Post subject: Re: Determining Blob field size Reply with quote

Fabio Dalle Ave wrote:

Quote:
Hi,
I need to determine the size of the contents of blob fields stored it a
table. I would like to do this server side, without having to loop
through each record, retrieving the content of the blob field and
finding its size (this is *MOST* inefficient, especially in a WAN
environment).
I need both MS SQL Server 2000 and Firebird 1.5 support. Is there any
server function to do that? I guess I could write a delphi UDF for
firebird somehow to do this, but I wouldn't know how to do so in MS SQL
Server.

Thanks for any clue.



I think there is an API call for Fb/1.5 (I've never used the API
myself). If no one answers here, take a trip to the Firebird support NG.
Start here:
http://www.ibphoenix.com/main.nfs?a=ibphoenix&s=1089745825:22319&page=ibp_groups


--
Aage J.

Back to top
Fabio Dalle Ave
Guest





PostPosted: Wed Jul 14, 2004 7:41 am    Post subject: Re: Determining Blob field size Reply with quote

Aage Johansen wrote:

Quote:
Fabio Dalle Ave wrote:

Hi,
I need to determine the size of the contents of blob fields stored
it a table. I would like to do this server side, without having to
loop through each record, retrieving the content of the blob field
and finding its size (this is MOST inefficient, especially in a WAN
environment).
I need both MS SQL Server 2000 and Firebird 1.5 support. Is there
any server function to do that? I guess I could write a delphi UDF
for firebird somehow to do this, but I wouldn't know how to do so
in MS SQL Server.

Thanks for any clue.



I think there is an API call for Fb/1.5 (I've never used the API
myself). If no one answers here, take a trip to the Firebird support
NG. Start here:
http://www.ibphoenix.com/main.nfs?a=ibphoenix&s=1089745825:22319&page=
ibp_groups

Thanks.
I was able to find a BlobSize function is the FreeUDFLib package. I
just used that and it seems to work just fine.

Thanks for the hint.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.