i dont know how to fix this, i have already try everything.
Error System.InvalidOperationException' occurred in System.Data.dll
Additional information: The provider 'Microsoft.ACE.Oledb.12.0' is not registered on the local computer.
pops up on this code line commLogin.Connection.Open()
I need help!
If TextBox1.Text = "" Then
MessageBox.Show("Username!", "Login", MessageBoxButtons.OK, MessageBoxIcon.Error)
TextBox1.Focus()
ElseIf TextBox2.Text = "" Then
MessageBox.Show("Password!", "Login", MessageBoxButtons.OK, MessageBoxIcon.Error)
TextBox2.Focus()
Else
Dim conLogin As New OleDb.OleDbConnection("PROVIDER=Microsoft.ACE.Oledb.12.0; Data Source = E:\projeto.mdb")
Dim commLogin As New OleDb.OleDbCommand("SELECT login.password FROM login WHERE nome_util = @username AND password = @password", conLogin)
Dim usernameParam As New OleDb.OleDbParameter("@username", Me.TextBox1.Text)
Dim passwordParam As New OleDb.OleDbParameter("@password", Me.TextBox2.Text)
commLogin.Parameters.Add(usernameParam)
commLogin.Parameters.Add(passwordParam)
commLogin.Connection.Open()
Dim reader As OleDb.OleDbDataReader = commLogin.ExecuteReader()
If reader.HasRows Then
MessageBox.Show("ggwp", "Login", MessageBoxButtons.OK, MessageBoxIcon.Information)
principal.Show()
Me.Hide()
Else
MessageBox.Show("Keep Trying", "Login", MessageBoxButtons.OK, MessageBoxIcon.Error)
TextBox1.Clear()
TextBox2.Clear()
TextBox1.Focus()
End If
commLogin.Connection.Close()
End If