Solved

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

Posted on 2013-07-01
2
469 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SLMGR Switches Are Not Working On KMS Host 3 69
vb.net checkbox 7 41
Connection String 16 43
Variable Event ? 3 23
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now