将图片保存至oracle数据库的一段代码,LZ可以参考一下
//获取图片文件
if OpenPictureDialog1.Execute then
begin
img_pad.picture.loadfromfile(openpicturedialog1.filename) ;
end;
//保存至数据库
ClipBoard.Assign(img_pad.Picture);
dm_db.Database_rsgl.StartTransaction;
try
DBImage_photo.PasteFromClipBoard;
dm_db.T_RS_ZD_EMPLOYEE.ApplyUpdates;
dm_db.Database_rsgl.Commit;
dm_db.T_RS_ZD_EMPLOYEE.CommitUpdates;
except
dm_db.Database_rsgl.Rollback;
raise;
end;