bitmap and oleobject field

Hi, all, I got a problem here, I could extract bitmap picture from oleobject field in Access database, and managed to store it in a file, but then I wanted to store a picture to that field, the value at Access database changed from "Bitmap Image" to "Long Binary Data", I insert the bitmap file like this :

image->Picture->LoadFromFile(ImgFileName);

TStream *blob;
blob=DataSet1->CreateBlobStream(DataSet1->FieldByName("Image"),bmWrite);
image->Picture->Bitmap->SaveToStream(blob);
blob->Free();
dtSrcPatientImage->DataSet->Post();

Does anyone know where the problem is ?

Comments

  • I'm sorry, accidentally posted the same thread twice, and about dtSrcPatientImage, just consider it as DataSet1, thank you
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion