Discussion:
blob size
(too old to reply)
John Cantin
2008-01-29 19:22:08 UTC
Permalink
how can i get the size of the data stored in a blob field?

i was trying...

sizeof(ibquery1.fieldbyname('picture').Value)

but it always returns a 16

ive also tried

sizeof(ibquery1.fieldbyname('picture').asstring)

but it always returns a 4

i figure its probably the size of the pointer to the data instead of the
size of the data
Craig Stuntz [TeamB]
2008-01-29 18:33:36 UTC
Permalink
Post by John Cantin
sizeof(ibquery1.fieldbyname('picture').asstring)
Depends on what's in it. If you want the length of a string in chars,
use Length, not SizeOf.

If it's something else, be more specific, please.
--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Useful articles about InterBase development:
http://blogs.teamb.com/craigstuntz/category/21.aspx
John Cantin
2008-01-29 19:54:18 UTC
Permalink
that was the trick!

thanks!
Post by Craig Stuntz [TeamB]
Post by John Cantin
sizeof(ibquery1.fieldbyname('picture').asstring)
Depends on what's in it. If you want the length of a string in chars,
use Length, not SizeOf.
If it's something else, be more specific, please.
Marc Rohloff [TeamB]
2008-01-29 20:20:02 UTC
Permalink
On Tue, 29 Jan 2008 13:22:08 -0600, John Cantin wrote:

Please don't multipost. I answered this elsewhere.
--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
John Cantin
2008-02-02 17:05:55 UTC
Permalink
sorry, i wasnt sure where to ask.
Post by Marc Rohloff [TeamB]
Please don't multipost. I answered this elsewhere.
Loading...