Can not save JPEG Image to Image Field
Posted: Tue 07 Feb 2006 08:24
I can not save a jpeg image to a image field. I use the following code:
TJPEGImage *jp;
....
TStream *Stream1=NULL;
Query->Edit();
Stream1 = Query->CreateBlobStream(Query->FieldByName("Logo"), bmWrite);
jp->SaveToStream(Stream1);
Query->Post();
I don't get an error message but there is nothing written to the database either. I am sure that jp holds the related image.
TJPEGImage *jp;
....
TStream *Stream1=NULL;
Query->Edit();
Stream1 = Query->CreateBlobStream(Query->FieldByName("Logo"), bmWrite);
jp->SaveToStream(Stream1);
Query->Post();
I don't get an error message but there is nothing written to the database either. I am sure that jp holds the related image.