7,763
社区成员
发帖
与我相关
我的任务
分享
If not IsNull(rs!photo) Then
set itm=new adodb.stream
with itm
.Type = adTypeBinary
.Open
.Write rs!photo
.SaveToFile "d:\bgxvb\temp.jpg", adSaveCreateOverWrite
.Close
end with
Set itm = Nothing
Image1.Picture = LoadPicture("d:\bgxvb\temp.jpg")
Else
Image1.Picture = LoadPicture()
End If
If not IsNull(rs!photo) Then
itm.Type = adTypeBinary
itm.Open
'文件已经存在,则先删除
if dir("d:\bgxvb\temp.jpg")<>"" then kill d:\bgxvb\temp.jpg
itm.Write rs!photo
itm.SaveToFile "d:\bgxvb\temp.jpg", adSaveCreateOverWrite
itm.Close
Set itm = Nothing
Image1.Picture = LoadPicture("d:\bgxvb\temp.jpg")
End If