Solved

The 'Microsoft.Jet.OleDb.4.0' provider is not registered on the local machine.

Posted on 2013-07-01
2
473 Views
Last Modified: 2013-07-02
Good Day:

When I run my web project from the webserver, I am getting the attached error message.
This error occurs when I try to login.

The code on my login button is as follows:

Protected Sub btn_Login_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btn_Login.Click
        Dim connect As String = "Provider=Microsoft.Jet.OleDb.4.0;" & _
  "Data Source=\\webserver\Payroll\App_Data\otusers.mdb"
        Dim query As String
        query = "Select Count(*) From tblUsers Where Username = ? And UserPassword = ?"
        Dim result As Integer = 0
        Using conn As New OleDbConnection(connect)
            Using cmd As New OleDbCommand(query, conn)
                cmd.Parameters.AddWithValue("", UserName.Text)
                cmd.Parameters.AddWithValue("", Password.Text)
                conn.Open()
                Session("User") = UserName.Text
                result = DirectCast(cmd.ExecuteScalar(), Integer)
            End Using
        End Using
        If result > 0 Then
            Response.Redirect("MainMenu.aspx")
        Else
            Literal1.Text = "Invalid credentials! Please re-enter your username and password and try again."
        End If


    End Sub


However, when I build and run my project on the client's computer all works well.

Please advise
0
Comment
Question by:ernie_shah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Accepted Solution

by:
TheAvenger earned 500 total points
ID: 39291393
This post says that this is a problem with x64 applications and ODBC. I suppose your client machine is x86 (32 bit) and thus runs your application in 32bit mode. However the server automatically switches to 64 bit mode.

Read the thread but I think the best and first to test advice is this one: "If the issue persist in ASP.NET,All I had to do was change the "Enable 32-bit Applications" setting to True, in the Advanced Settings for the Application Pool."
0
 

Author Comment

by:ernie_shah
ID: 39293237
I made the stated change to the application pool for my project and it works like a charm.

Many thanks.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question