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. ASP.NET
  4. Problem in access database login

Problem in access database login

Scheduled Pinned Locked Moved ASP.NET
helpcsharpdatabasedebugging
4 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.
  • J Offline
    J Offline
    jacal99
    wrote on last edited by
    #1

    i am getting error .... the error is as under ----------------------- Exception Details: System.Data.OleDb.OleDbException: No error information available: REGDB_E_CLASSNOTREG(0x80040154). ------------------------- this error is on this line ----------------------- oledbCon.Open(); ------------------------ and my all code is as under --------------------------- <%@ Page Language="C#" Debug="True" %> <%@ import Namespace="System.Data" %> <%@ import Namespace="System.Data.OleDb" %> // Insert page code here OleDbConnection oledbCon; void Page_Load(Object sender, EventArgs e) { OleDbConnection oledbCon = new OleDbConnection("Provider = Microsoft.Jec.OleDb.4.0; DataSource = d:\\access1.mdb"); } void login_check(Object sender, EventArgs e) { string uid = txtuser.Text; string upass = txtpass.Text; OleDbConnection oledbCon = new OleDbConnection("Provider = Microsoft.Jec.OleDb.4.0; DataSource = d:\\access1.mdb"); OleDbCommand oledbCom = new OleDbCommand("Select fname from users where username = '"+uid+"' and upassword = '"+upass+"' ", oledbCon); oledbCon.Open(); OleDbDataReader dr = oledbCom.ExecuteReader(); if(dr.Read()) { Response.Write("You are logged in"); string url = Request.QueryString["ReturnUrl"]; if(url==null) url = "main.aspx"; Response.Redirect(url); } else { Response.Write("Your Login Faild Try to Register and then login"); } }

    Access Login

    Username:

    Password:

    M 1 Reply Last reply
    0
    • J jacal99

      i am getting error .... the error is as under ----------------------- Exception Details: System.Data.OleDb.OleDbException: No error information available: REGDB_E_CLASSNOTREG(0x80040154). ------------------------- this error is on this line ----------------------- oledbCon.Open(); ------------------------ and my all code is as under --------------------------- <%@ Page Language="C#" Debug="True" %> <%@ import Namespace="System.Data" %> <%@ import Namespace="System.Data.OleDb" %> // Insert page code here OleDbConnection oledbCon; void Page_Load(Object sender, EventArgs e) { OleDbConnection oledbCon = new OleDbConnection("Provider = Microsoft.Jec.OleDb.4.0; DataSource = d:\\access1.mdb"); } void login_check(Object sender, EventArgs e) { string uid = txtuser.Text; string upass = txtpass.Text; OleDbConnection oledbCon = new OleDbConnection("Provider = Microsoft.Jec.OleDb.4.0; DataSource = d:\\access1.mdb"); OleDbCommand oledbCom = new OleDbCommand("Select fname from users where username = '"+uid+"' and upassword = '"+upass+"' ", oledbCon); oledbCon.Open(); OleDbDataReader dr = oledbCom.ExecuteReader(); if(dr.Read()) { Response.Write("You are logged in"); string url = Request.QueryString["ReturnUrl"]; if(url==null) url = "main.aspx"; Response.Redirect(url); } else { Response.Write("Your Login Faild Try to Register and then login"); } }

      Access Login

      Username:

      Password:

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

      Hi there. You're using

      Provider = Microsoft.Jec.OleDb.4.0

      as a provider string... should it be

      Provider = Microsoft.Jet.OleDb.4.0

      instead? ("Jet" instead of "Jec"?)

      J 1 Reply Last reply
      0
      • M Mike Ellison

        Hi there. You're using

        Provider = Microsoft.Jec.OleDb.4.0

        as a provider string... should it be

        Provider = Microsoft.Jet.OleDb.4.0

        instead? ("Jet" instead of "Jec"?)

        J Offline
        J Offline
        jacal99
        wrote on last edited by
        #3

        Gentlemen, the error is still there after changing the connection. plz suggest some other solution or if possible check it again. Thanks in Advance, Mazhar Hussain

        M 1 Reply Last reply
        0
        • J jacal99

          Gentlemen, the error is still there after changing the connection. plz suggest some other solution or if possible check it again. Thanks in Advance, Mazhar Hussain

          M Offline
          M Offline
          Mike Ellison
          wrote on last edited by
          #4

          Is it possible you don't have the Jet provider installed and registered on your machine?

          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