Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2013-07-01
2
Medium Priority
?
484 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 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

618 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