还是不明白,我是在SQL Server里建的数据库,zp00为照片字段,是image类型,我在窗体中添加了一个dbimage、button、openpicturedialog控件,我想通过单击button来选择图片,并把图片显示在dbimage中,然后保存到数据库中。
button的click事件代码如下:
dbimage1.DataField:='zp00';
//选择图像
if openpicturedialog1.Execute then
begin
fdm.q_student.Edit;
dbimage1.Picture.LoadFromFile(openpicturedialog1.FileName);