OraOLEDB.Oracle提供程序未在本地计算机上注册

时间:2012-10-10 13:55:26

标签: c# .net sql windows visual-studio-2010

我刚刚从Win XP升级到Win 7。我在.Net机器上写的XP应用程序现在在我的Win&机。

        OleDbConnection _conn = new OleDbConnection(_conString);
        try
        {
            _conn.Open();
            return true;
        }

检查是否存在打开的数据库连接时发生错误 - _conn.Open()

The 'OraOLEDB.Oracle' provider is not registered on the local machine.

1 个答案:

答案 0 :(得分:1)

您需要将location已安装的文件放在PATH variable for windows.

如果使用install.bat文件在C:\ Oracle安装文件,则需要在the PATH variable中放置路径“C:\ Oracle”和C:\ Oracle \ bin“。

您可以在right-clickingMy computer selecting Properties (for Windows Vista/7users, it's right clicking on Computer then properties then advanced system settings)找到此变量。单击Advanced tab and click the Environment Variables button.在系统变量列表中,您将找到PATH variable