Subject | Re: [IBO] Blob-jpeg issues |
---|---|
Author | Ryan Nilsson-Harding <nilsson@bigpond.ne |
Post date | 2003-01-07T13:11:05Z |
Hi there,
I now have my app displaying jpg's from a blob field in a TImage
control via a TJPEGImage, but I would like to understand whats going
on a little better. (I'm a bit confused!!)
My code below works, but it seems somewhat tautological:
{jpg is a pre-declared TJPEGImage}
jpg.LoadFromStream(myQuery.FieldByName
('PIC').Row.Statement.CreateBlobStream(myQuery.FieldByName('PIC'),
bsmRead));
It seems wrong to me to be stating the ('PIC') field twice in this
statement, and I'm wondering if this is messy coding. Is there a
more precise way of doing what I'm doing?
Is the best way to declare my own TIB_Statement variable, and use
that or is it OK to go the long way (as it seems I have done.)
IBO has powerful things below seemingly confusing ways, and I'm not
sure if I'm missing something here.
rgds,
-Ryan
I now have my app displaying jpg's from a blob field in a TImage
control via a TJPEGImage, but I would like to understand whats going
on a little better. (I'm a bit confused!!)
My code below works, but it seems somewhat tautological:
{jpg is a pre-declared TJPEGImage}
jpg.LoadFromStream(myQuery.FieldByName
('PIC').Row.Statement.CreateBlobStream(myQuery.FieldByName('PIC'),
bsmRead));
It seems wrong to me to be stating the ('PIC') field twice in this
statement, and I'm wondering if this is messy coding. Is there a
more precise way of doing what I'm doing?
Is the best way to declare my own TIB_Statement variable, and use
that or is it OK to go the long way (as it seems I have done.)
IBO has powerful things below seemingly confusing ways, and I'm not
sure if I'm missing something here.
rgds,
-Ryan