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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. facing problem with C# ODP.Net API(Oracle.DataAccess.dll) "Open cursors exceeded" exception is occured

facing problem with C# ODP.Net API(Oracle.DataAccess.dll) "Open cursors exceeded" exception is occured

Scheduled Pinned Locked Moved C#
csharpc++databaseoraclexml
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.
  • M Offline
    M Offline
    member123456
    wrote on last edited by
    #1

    I am using the C# API to insert a xml file which is having schemaLocation attribute in it. from the database side, we are using ODP.Net provider for oracle 10g. ODP.Net is having full support in case of xml native functionalities and we are using non-structured xml type of storage. Problem: "Open cursors exceeded" exception is coming when importing more than 300 xml files into xmltype(Oracle) field with ODP.Net provider(Oracle.DataAccess.dll) using the relevant C# API for that.(I have Disposed all the resources using here). here is the sample code: string strFileContents = strXmlRecordContent; if (Conn == null) { Conn = new Oracle.DataAccess.Client.OracleConnection(CatalogueDbConnection.ConnectionString); } if (Conn.State != ConnectionState.Open) { Conn.Open(); } Oracle.DataAccess.Client.OracleCommand cmdInsertXmlRec = new Oracle.DataAccess.Client.OracleCommand(); cmdInsertXmlRec.Connection = Conn; cmdInsertXmlRec.CommandText = "INSERT INTO XMLRecord (MetadataID,XMLData) VALUES(:Metadataid,:strFileContents ) "; cmdInsertXmlRec.Parameters.Add(":Metadataid", Oracle.DataAccess.Client.OracleDbType.Int32).Value = MetadataID; OracleXmlType Text = new OracleXmlType(Conn, doc); cmdInsertXmlRec.Parameters.Add(":strFileContents", Oracle.DataAccess.Client.OracleDbType.XmlType).Value = Text; cmdInsertXmlRec.ExecuteNonQuery(); if (cmdInsertXmlRec != null) cmdInsertXmlRec.Dispose(); one main observation: cursors are opened if the xml file is having schemaLoaction attribute in it.

    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