Procedure TForm1.LoadPassPic(pDataSet: TCustomADODataSet; pField, pPicField: String);
Var
Ms: TMemoryStream;
bitmap: TBitmap;
Begin
Begin
pDataSet.Edit;
Ms := TMemoryStream.Create;
//jpg := TJPEGImage.Create;
bitmap := TBitmap.Create;
ilPic.GetBitmap(pDataSet.FieldByName(pField).AsInteger, bitmap);
//ilPic.GetBitmap(1, bitmap);
bitmap.SaveToFile('1.bmp');
Ms.Position := 0;
TBlobField(pDataSet.FieldByName(pPicField)).LoadFromFile('1.bmp');
//TBlobField(pDataSet.FieldByName(pPicField)).LoadFromFile('D:\-2176.bmp');
// pDataSet.Post;
// pDataSet.UpdateBatch();
Ms.Free;
bitmap.Free;
//jpg.free;
End;
End;