Dim Rs As New ADODB.RecordSet
Dim Sm As New ADODB.Stream 'ADO Stream流对象
....
Rs.Open ...
Rs.AddNew
With Sm
.Type = adTypeBinary '二进制模式
.Open '打开流对象
.LoadFromFile strPath & "\temp.jpg" '从文件载入
Rs.Fields("Picture") = .Read '读取文件并写入数据库
.Close
End With
Set Sm = Nothing
Rs.Update
....