I am writing code for connecting to an access database in my windows 7 machine. Am using visual studio 2010 with access 2007. While debugging the code am getting the exception "The 'Microsoft.Jet.OLEDB.4,0' provider is not registered on the local machine".
Below is my code,

            connection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4,0;Data Source=G:\Kothai\Tools\Database\ChurchDB.mdb;")
            command = New OleDbCommand("Select * from Login", connection)
            Reader = command.ExecuteReader()
            While Reader.Read
                If (txtusername.Text = Reader(0) And txtpwd.Text = Reader(1)) Then
                    MessageBox.Show("Login Successfull")
                    MessageBox.Show("Login Not Successfull")
                End If
            End While
        Catch ex As Exception

        End Try

while browsing i found that i need to install "Microsoft Access Database Engine 2010 Redistributable". Currently i have access 2007 for intalling the above, whether i need to uninstall the whole microsoft office or is there any other way to overcome this?

You don't need Office to access the provider, just the redistributable.

Thanks, But while am attempting to install Microsoft Access Database Engine 2010 Redistributable it shows message "already another version of MS Office is installed please uninstall and try".

Are you currently running Windows 7 64-bit?