 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Fabio Dalle Ave Guest
|
Posted: Tue Jul 13, 2004 1:17 pm Post subject: Determining Blob field size |
|
|
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
|
Posted: Tue Jul 13, 2004 2:50 pm Post subject: Re: Determining Blob field size |
|
|
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
|
Posted: Tue Jul 13, 2004 3:32 pm Post subject: Re: Determining Blob field size |
|
|
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
|
Posted: Tue Jul 13, 2004 4:25 pm Post subject: Re: Determining Blob field size |
|
|
Alain Quesnel wrote:
Awesome!!!
Now... if anybody has a clue about Firebird ;)
Thanks guys!!
|
|
| Back to top |
|
 |
Aage Johansen Guest
|
Posted: Tue Jul 13, 2004 9:34 pm Post subject: Re: Determining Blob field size |
|
|
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
|
Posted: Wed Jul 14, 2004 7:41 am Post subject: Re: Determining Blob field size |
|
|
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 |
|
 |
|
|
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
|
|