Saving JPEG images to images field in SQL2000 with ADODataSet
- From: "Wira" <wira@xxxxxxxxxxxxxxxx>
- Date: Thu, 15 Jun 2006 12:06:49 +0700
I'm Using D5 and SQL2000 for database.
One of my tables in SQL2000 have an image field type for saving picture ,
the problem is when I want to save JPEG images into my table always appear
error message "Bitmap image is not valid".
procedure SavePicture ;
var FStream : TMemoryStream ;
begin
with tblPicture do begin //tblPicture is ADODataSet Component
try
Insert ;
FStream := TMemoryStream.Create ;
FStream.LoadFromFile('C:\PictureFiles\Image01.JPG') ;
TBlobField(FieldByName('im_pic_thumbnail')).LoadFromStream(FStream)
;
Post ;
finally
FStream.Free
end;
end;
end;
Thanks
Wira
.
- Follow-Ups:
- Re: Saving JPEG images to images field in SQL2000 with ADODataSet
- From: Brian Bushay TeamB
- Re: Saving JPEG images to images field in SQL2000 with ADODataSet
- From: Martin Cremer
- Re: Saving JPEG images to images field in SQL2000 with ADODataSet
- Prev by Date: data type of field value
- Next by Date: Re: ADOX - Create new query in Access Database
- Previous by thread: data type of field value
- Next by thread: Re: Saving JPEG images to images field in SQL2000 with ADODataSet
- Index(es):