存取oracle中blob字段出现错误,求助!
大家好,我要读取oracle中blob字段中的图片,参考了微软的相关方法,就是以下这程序,但运行到rs.Open "Select * from tbl_fileofupload", cn, adOpenKeyset, adLockOptimistic时,总是报错:数据类型不支持,为什么?已引用 Microsoft ActiveX Data Objects 2.5 Library 及以上版本
Private Sub Command1_Click()
Set cn = New ADODB.Connection
cn.Open "Provider=MSDAORA.1;Password=ttpd;User ID=ttpd;Data Source=ORA_218.98.192.11;Persist Security Info=True;"
Set rs = New ADODB.Recordset
rs.Open "Select * from tbl_fileofupload where fileid=1", cn, adOpenKeyset, adLockOptimistic
Set mstream = New ADODB.Stream
mstream.Type = adTypeBinary
mstream.Open
mstream.Write rs.Fields("filecontent").Value
mstream.SaveToFile "c:\publogo.gif", adSaveCreateOverWrite
rs.Close
cn.Close
End Sub