提供程序'Microsoft.Jet.OLEDB.4.0'未在本地计算机上注册,请帮助我



他的是我用 c # 开发的代码,它没有将我连接到数据库不知道为什么,我正确使用了所有内容,错误是提供程序"Microsoft.Jet.OLEDB.4.0"未在本地计算机上注册。

enter code here
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 conexion de base de datos");
}
}

确实没有 64 位版本的 Jet——也没有计划(显然(生产一个。

您可能可以使用 ACE 64 位驱动程序:http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=23734[^] - 但如果您需要返回 Jet 以获取 32 位应用程序,我不知道这将如何工作。

但是,您可以在 Express 版本中将项目切换到 32 位(我还没有尝试过,也没有再安装任何风格的 2008( - 这里有一个线程在谈论它:http://xboxforums.create.msdn.com/forums/t/4377.aspx#22601[^]

也许是时候完全废弃 Access 数据库,咬紧牙关转而使用 SQL 服务器了?

相关内容

最新更新