主题:从数据库读取图片
代码如下:
query1.close;
Query1.SQL.Text:='select * from table1';
query1.open;
if not query1.FieldByName('test').IsNull then
begin
// stream:=Tmemorystream.Create;
// Jpg:=TBitmap.Create ;
Stream:=TMemoryStream.Create ;
Jpg:=TjpegImage.Create ;
query1.CreateBlobStream(Query1.FieldByName('test'),bmread);
image2.Picture.Bitmap.LoadFromStream(stream);
stream.free
没有报错单界面上没图片
帮我看看
query1.close;
Query1.SQL.Text:='select * from table1';
query1.open;
if not query1.FieldByName('test').IsNull then
begin
// stream:=Tmemorystream.Create;
// Jpg:=TBitmap.Create ;
Stream:=TMemoryStream.Create ;
Jpg:=TjpegImage.Create ;
query1.CreateBlobStream(Query1.FieldByName('test'),bmread);
image2.Picture.Bitmap.LoadFromStream(stream);
stream.free
没有报错单界面上没图片
帮我看看