如何向SQL Server中保存bmp图象以及读取
来源:互联网 发布:数据采集系统源代码 编辑:程序博客网 时间:2024/05/22 07:42
插入修改 保存图象
bmTemp:=TBitmap.Create;
ms:=TMemoryStream.Create;
try
qryFace.Close;
qryFace.SQL.Clear;
qryFace.SQL.Add('update video_face_image set face_image2=:face_image2');
qryFace.SQL.Add(Format('where event_id=%d',[qryPrepare.FieldByName('event_id').AsInteger]));
bmTemp.LoadFromFile('c:face2.bmp');
bmTemp.SaveToStream(ms);
qryFace.Parameters.ParamByName('face_image2').LoadFromStream(ms,ftBlob);
finally
ms.Free;
bmTemp.Free;
end;
如何在Image组件中显示
bmTemp:=TBitmap.Create;
ms:=TMemoryStream.Create;
try
TBlobField(qryFace.FieldByName('face_image1')).SaveToStream(ms);
ms.Position:=0; //最最重要的一点
bmTemp.LoadFromStream(ms);
imgFace1.Picture.Bitmap:=bmTemp;
finally
ms.Free;
bmTemp.Free;
end;
- 如何向SQL Server中保存bmp图象以及读取
- 如何向SQL Server中保存bmp图象以及读取
- Vb.net向sql server数据库中保存图片(一)
- Vb.net向sql server数据库中保存图片(二)
- Vb.net向sql server数据库中保存图片(一)
- Vb.net向sql server数据库中保存图片及图片管理
- C#如何在 SQL Server2000 中保存图像及读取图像信息
- C#如何在 SQL Server2000 中保存图像及读取图像信息
- 在SQL Server中保存和输出图片
- 在SQL Server中保存和输出图片
- 在SQL Server中保存和输出图片
- 在SQL Server中保存和输出图片[转]
- sql server数据库中保存图片及图片管理 .
- jdbc向数据库中保存图片
- 如何使用C#将图象文件存入SQL Server ?
- 在数据库中保存和读取图片
- 在页面中保存和读取cookie
- xml中保存如何保存图片及从XML中读取出来显示到浏览器中
- 驱动SYS开发总结
- BDE连接数据库
- javascript 模式对话框
- 采访 Alain 'Lino' Tadros
- MySQL入门学习(五)多表操作
- 如何向SQL Server中保存bmp图象以及读取
- 教你应该如何来对抗MySQL数据库解密高手
- 幻灯片中的图片 链接数据库
- 由图像的灰度化看基本图像处理(1)
- Hibernate+mysql乱码问题解决方案
- 推荐:让你的MySQL数据库彻底与中文联姻
- 在 .NET 中使用 oracle 数据库 事务提交,事务保存点
- 好久没有来了
- 由图像的灰度化看基本图像处理(2)