Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Insert file into Oracle blob filed with VB 2008 and Ado

Insert file into Oracle blob filed with VB 2008 and Ado

Scheduled Pinned Locked Moved Visual Basic
helpquestionoracletutorialannouncement
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Filippo1974
    wrote on last edited by
    #1

    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

    D 1 Reply Last reply
    0
    • F Filippo1974

      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

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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

      F 1 Reply Last reply
      0
      • D Dave Kreskowiak

        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

        F Offline
        F Offline
        Filippo1974
        wrote on last edited by
        #3

        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

        D 1 Reply Last reply
        0
        • F Filippo1974

          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

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups