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. How to Insert data from Blob field to Oracle Database

How to Insert data from Blob field to Oracle Database

Scheduled Pinned Locked Moved Visual Basic
helpcsharpdatabaseoracle
1 Posts 1 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.
  • S Offline
    S Offline
    Syed Ali Raza
    wrote on last edited by
    #1

    Hi; I m using VB.net. I have inserted the data in SQLSERVER in this form but having this error while trying in Oracle. Im using class for connection "ORA-01036, Illegal Name/Variable " this is the Code I m using. Dim LclsGeneral As New GClsGeneral Dim fs As FileStream = New FileStream(txtContent.Text, FileMode.Open, FileAccess.Read) Dim img(fs.Length) As Byte fs.Read(img, 0, System.Convert.ToInt32(fs.Length)) Dim conn As New OracleClient.OracleConnection Dim LClscnn As New GClsConnection conn.ConnectionString = LClscnn.GetConnectionString If conn.State = ConnectionState.Closed Then conn.Open() Dim Lcmd As New OracleClient.OracleCommand Lcmd.Connection = conn Lcmd.CommandText = "Insert into Test (DOCUMENTID,DOCUMENTCONTENT) VALUES ('" & txtID.Text & "',@DOCUMENTCONTENT)" Lcmd.Parameters.Add("@DOCUMENTCONTENT", OracleClient.OracleType.Blob,img.Length).Value = img Lcmd.ExecuteNonQuery() fs.Close() txtID.Text = "" txtContent.Text = "" Kindly help me Thank you

    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