版主,心中有剑的文件我打不开(图片怎样读成二进制)
保存图片到数据库(Adodb.Stream)'保存图片到数据库(Adodb.Stream)Public Sub SaveImageToDB(Rs As ADODB.Recordset, cFieldName As String, strImageFile As String)
Dim stm As ADODB.Stream
Set stm = New ADODB.Stream
stm.Type = adTypeBinary
stm.Open
stm.LoadFromFile strImageFile
Rs.Fields(cFieldName).Value = stm.Read
Rs.Update
stm.Close
Set stm = Nothing
End Sub
刚才一个兄弟发来的, 但是strImageFile
怎么来的啊,总要把图片读成二进制,再把值赋给strImageFile
我不会读,help!HELP!