二进制文件存取. dim b() as bety open fileName for binary as #1 redim b(lof(#1)) get #1,,b() rs!员工照片=b() close #1 rs.update
Adoquery1.Edit; Try if OpenPictureDialog1.Execute then DBImage1.Picture.LoadFromFile(OpenPictureDialog1.Files[0]); Except showmessage('加载图片失败.'); End; Adoquery1.Post;
dim b() as bety
open fileName for binary as #1
redim b(lof(#1))
get #1,,b()
rs!员工照片=b()
close #1
rs.update
Try
if OpenPictureDialog1.Execute then
DBImage1.Picture.LoadFromFile(OpenPictureDialog1.Files[0]);
Except showmessage('加载图片失败.');
End;
Adoquery1.Post;