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. Web Development
  3. how to use ExecuteReader() with oracle

how to use ExecuteReader() with oracle

Scheduled Pinned Locked Moved Web Development
helpdatabaseoracletutorialquestion
2 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.
  • B Offline
    B Offline
    babutkchn
    wrote on last edited by
    #1

    hi, In my appication i'm using Oracle as a back end. In that when i'm using ExecuteReader() it shows an exception. Can any one of help me to solve this issue. oleDBConnection = new OleDbConnection(connectString); string query = "SELECT V_FIRST_NAME,V_LAST_NAME,V_PHONE_NUMBER,V_EMAIL,V_FAX_NUMBER,V_ADDRESS,V_TITLE,V_POSTAL_CODE,V_COUNTRY from UserDetails where (V_USER_ID = ?) AND (V_PASSWORD = ?)"; OleDbCommand oledbCmd = new OleDbCommand(query, oleDBConnection); oledbCmd.CommandText = query; oledbCmd.CommandType = CommandType.Text; OleDbParameter par = oledbCmd.Parameters.Add("UserName", OleDbType.VarWChar, 50); OleDbParameter parm = oledbCmd.Parameters.Add("password", OleDbType.VarWChar, 50); oledbCmd.Parameters["UserName"].Value = userName; oledbCmd.Parameters["password"].Value = password; oledbCmd.Connection = oleDBConnection; oleDBConnection.Open(); OleDbDataReader dr ; dr = oledbCmd.ExecuteReader(); It threw an exception when executing the last line. The exception states that Unspecified error.Oracle error occured,but error message could not retrieved from Oracle.Data Type is not supported.

    P 1 Reply Last reply
    0
    • B babutkchn

      hi, In my appication i'm using Oracle as a back end. In that when i'm using ExecuteReader() it shows an exception. Can any one of help me to solve this issue. oleDBConnection = new OleDbConnection(connectString); string query = "SELECT V_FIRST_NAME,V_LAST_NAME,V_PHONE_NUMBER,V_EMAIL,V_FAX_NUMBER,V_ADDRESS,V_TITLE,V_POSTAL_CODE,V_COUNTRY from UserDetails where (V_USER_ID = ?) AND (V_PASSWORD = ?)"; OleDbCommand oledbCmd = new OleDbCommand(query, oleDBConnection); oledbCmd.CommandText = query; oledbCmd.CommandType = CommandType.Text; OleDbParameter par = oledbCmd.Parameters.Add("UserName", OleDbType.VarWChar, 50); OleDbParameter parm = oledbCmd.Parameters.Add("password", OleDbType.VarWChar, 50); oledbCmd.Parameters["UserName"].Value = userName; oledbCmd.Parameters["password"].Value = password; oledbCmd.Connection = oleDBConnection; oleDBConnection.Open(); OleDbDataReader dr ; dr = oledbCmd.ExecuteReader(); It threw an exception when executing the last line. The exception states that Unspecified error.Oracle error occured,but error message could not retrieved from Oracle.Data Type is not supported.

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      Don't double-post.

      Paul Marfleet

      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