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. C#
  4. Oracle DB Querry Application Error

Oracle DB Querry Application Error

Scheduled Pinned Locked Moved C#
databaseoraclecomperformancehelp
2 Posts 2 Posters 1 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.
  • A Offline
    A Offline
    al3xutzu00
    wrote on last edited by
    #1

    Hi Guys, I want to insert in a list view all the Table Names from a Oracle DB. I started by learning how from Syed M Hussain 's post : A Very Simple Oracle Query Tool[^] using Oracle.DataAccess.Client; using Oracle.DataAccess.Types; ..... static private OracleConnection orcCon; private static OracleCommand cmd; private static OracleDataAdapter da; private static OracleCommandBuilder cb; private static DataSet ds; private static String sql; ..... public static DataTable GetUserTables() { sql = "SELECT TABLE_NAME FROM USER_TABLES"; cmd = new OracleCommand(sql, OrcCon); cmd.CommandType = CommandType.Text; da = new OracleDataAdapter(cmd); cb = new OracleCommandBuilder(da); ds = new DataSet(); da.Fill(ds); return ds.Tables[0]; } ........... dtTable = Code.ConectareOracle.GetUserTables(); for (int i = 0; i < dtTable.Rows.Count; i++) { MessageBox.Show(dtTable.Rows[i].ToString()); } .... ..and the error i get is that da.Fill(ds) has : "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." Any ideea? Kind regards, Alex

    “Be the change you want to see in the world.”

    R 1 Reply Last reply
    0
    • A al3xutzu00

      Hi Guys, I want to insert in a list view all the Table Names from a Oracle DB. I started by learning how from Syed M Hussain 's post : A Very Simple Oracle Query Tool[^] using Oracle.DataAccess.Client; using Oracle.DataAccess.Types; ..... static private OracleConnection orcCon; private static OracleCommand cmd; private static OracleDataAdapter da; private static OracleCommandBuilder cb; private static DataSet ds; private static String sql; ..... public static DataTable GetUserTables() { sql = "SELECT TABLE_NAME FROM USER_TABLES"; cmd = new OracleCommand(sql, OrcCon); cmd.CommandType = CommandType.Text; da = new OracleDataAdapter(cmd); cb = new OracleCommandBuilder(da); ds = new DataSet(); da.Fill(ds); return ds.Tables[0]; } ........... dtTable = Code.ConectareOracle.GetUserTables(); for (int i = 0; i < dtTable.Rows.Count; i++) { MessageBox.Show(dtTable.Rows[i].ToString()); } .... ..and the error i get is that da.Fill(ds) has : "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." Any ideea? Kind regards, Alex

      “Be the change you want to see in the world.”

      R Offline
      R Offline
      Rajesh Anuhya
      wrote on last edited by
      #2

      use Query "select * from tab where TABTYPE='TABLE'" instead of "SELECT TABLE_NAME FROM USER_TABLES" the problem may be , your user don't have the sufficient previlizes.

      Rajesh B --> A Poor Workman Blames His Tools <--

      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