this is my code developed with c # and it does not connect me to the database dont know why, i am using everything correctly, the error is The provider 'Microsoft.Jet.OLEDB.4.0' is not registered on the local computer.
static public void conectar()
{
try {
string gsPatchUbicar = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
gsPatchUbicar = gsPatchUbicar.Substring(6);
DireccionBD = gsPatchUbicar + "\\db_deportes.mdb";
string stringconeccion = string.Format(@"PROVIDER=Microsoft.Jet.OLEBD.4.0;Data Source={0}; Jet OLEBD:Database Password={1}", DireccionBD, PasswordBD);
getConexion = new OleDbConnection(stringconeccion);
getConexion.Open();
MessageBox.Show("Conexion a base de datos exitosa!!", "ok", MessageBoxButtons.OK, MessageBoxIcon.Information);
} catch (Exception H)
{
MessageBox.Show("hay un error en la conxion de base de datos");
}
}