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. Database & SysAdmin
  3. Database
  4. System.Data.OleDb.OleDbException

System.Data.OleDb.OleDbException

Scheduled Pinned Locked Moved Database
database
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.
  • S Offline
    S Offline
    s4_sabahatf
    wrote on last edited by
    #1

    OleDbConnection objConnection = null; OleDbCommand objCmd = null; String strConnection, strSQL; strConnection = "Provider=Microsoft.Jet.OleDb.4.0;"; strConnection += @"Data Source=C:\use.mdb"; //strConnection += @"Data Source="+MapPath("use.mdb"); // Create and open the connection object objConnection = new OleDbConnection(strConnection); objConnection.ConnectionString = strConnection; objConnection.Open(); // set the SQL string strSQL = "INSERT INTO user (username , password ) " +"VALUES ( '1' , '9' )"; // Create the Command and set its properties objCmd = new OleDbCommand(strSQL, objConnection); // execute the command objCmd.ExecuteNonQuery(); /////////////////////////////////////////////////////////// Please do tell me the solution for following Exception ///////////////////////////////////////////////////////// An unhandled exception of type'System.Data.OleDb.OleDbException' occurred in system.data.dll

    M 1 Reply Last reply
    0
    • S s4_sabahatf

      OleDbConnection objConnection = null; OleDbCommand objCmd = null; String strConnection, strSQL; strConnection = "Provider=Microsoft.Jet.OleDb.4.0;"; strConnection += @"Data Source=C:\use.mdb"; //strConnection += @"Data Source="+MapPath("use.mdb"); // Create and open the connection object objConnection = new OleDbConnection(strConnection); objConnection.ConnectionString = strConnection; objConnection.Open(); // set the SQL string strSQL = "INSERT INTO user (username , password ) " +"VALUES ( '1' , '9' )"; // Create the Command and set its properties objCmd = new OleDbCommand(strSQL, objConnection); // execute the command objCmd.ExecuteNonQuery(); /////////////////////////////////////////////////////////// Please do tell me the solution for following Exception ///////////////////////////////////////////////////////// An unhandled exception of type'System.Data.OleDb.OleDbException' occurred in system.data.dll

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      The database exceptions are pretty generic - to work out what's wrong, you'll need to look at the Message property of the exception. Then look that up in your database provider's documentation.


      DoEvents: Generating unexpected recursion since 1991

      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