Insert file into Oracle blob filed with VB 2008 and Ado
-
Hi all, anyone knows how can I store a file into a blob field in Oracle? I'm using VB 2008 and adodb (v. 2.8) and oracle ver.9.2.0.1.0 I tried with some example downloaded from internet, but no one works fine. Any suggestion will be really appreciate. Below you can see an example found in internet: Public sub ImportFile(ByVal sFile as string) Dim rs = New ADODB.Recordset Dim st = New ADODB.Stream rs.Open("Select * from doc_allegati where matricola = " & gMatricola, oConn, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockOptimistic) st.Type = ADODB.StreamTypeEnum.adTypeBinary st.Open() st.LoadFromFile(sFile) With rs .AddNew() .Fields("ID").Value = 1 .Fields("Documento").Value = st.Read .Update() End With rs.close st.close end sub This not work; when I try to open the recordset vb give me back an error message such as: 'data type not supported' Thaks in advance for your help, Filippo
-
Hi all, anyone knows how can I store a file into a blob field in Oracle? I'm using VB 2008 and adodb (v. 2.8) and oracle ver.9.2.0.1.0 I tried with some example downloaded from internet, but no one works fine. Any suggestion will be really appreciate. Below you can see an example found in internet: Public sub ImportFile(ByVal sFile as string) Dim rs = New ADODB.Recordset Dim st = New ADODB.Stream rs.Open("Select * from doc_allegati where matricola = " & gMatricola, oConn, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockOptimistic) st.Type = ADODB.StreamTypeEnum.adTypeBinary st.Open() st.LoadFromFile(sFile) With rs .AddNew() .Fields("ID").Value = 1 .Fields("Documento").Value = st.Read .Update() End With rs.close st.close end sub This not work; when I try to open the recordset vb give me back an error message such as: 'data type not supported' Thaks in advance for your help, Filippo
Lucky me - I don't use Oracle at all. But, a quick Google reveals a bunch of possiblities. Results...[^]
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Lucky me - I don't use Oracle at all. But, a quick Google reveals a bunch of possiblities. Results...[^]
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008Hi Dave, you are right, but into the example I need to use ODP.NET. Is it possible to manage this kind of field without install this? Thanks, Filippo
-
Hi Dave, you are right, but into the example I need to use ODP.NET. Is it possible to manage this kind of field without install this? Thanks, Filippo
So, you looked at one example that used ODP.NET. There are others in that list that use other database providers that work with Oracle.
Filippo1974 wrote:
Is it possible to manage this kind of field without install this?
Keep reading through the results list and find out. This is what is called "research", and it's an integral part of any programming job.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008