DBAdvCardList & JPEGs

Hi


Can the list display a JPEG Image?

When I try I get the message 'Bitmap image is not valid...

The JPEGs in my database table are valid JPEGs and other controls display these ok.

I've set my card item to be of data Type: Image.

Is there anything else I need to do?

Andy

Images are displayed via a TPicture, so if the JPEG unit is added in the uses list, this TPicture class should be able to render JPEG.

Card template item DataType should be set to idtImage and the image is expected to be stored in a binary blob and DB fieldname is set to card template item FieldName property.

OK, thanks I'll give that a go


Andy

Sorry to raise this again, but I've followed the above and still get the same error.

I'm using C++ Builder 2007 so I've included the JPEG.hpp file in my unit, but the control is still unhappy.

I guess there must be another issue then, i.e. the way you store the pictures in the database. Are you sure this is a binary blob? What database is this and how did you put these images in the database? Does a TDBAdvGrid display these images? Can you access the images directly by using the DBField?

Hi Bruno

I'm using NexusDB and the JPEGs are in their BLOB Graphic field type. The image data is stored into the database using the LoadFromStream function and the stream contains JPEG data provided by the ImageEn component library.

TDBAdvGrid displays them properly - I didn't have to tell TDBAdvGrid anything about the graphics type - I just dropped one on the form and set the DataSource and everything looked fine...

I do not have NexusDB installed here.
What is the value of TBlobField.BlobType for this specific field containing the JPEG?

It's a TGraphicField

And I've found if I change it to a normal BLOB/TBlobField everything works well :-) :smiley:

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.