文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>关于64bit位系统ODBC找不到的问题

关于64bit位系统ODBC找不到的问题

时间:2011-01-08  来源:luoht

在VS工具中设置编译为X86:

 

 

 

通过程序创建ODBC数据源:

       RegistryKey regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("Wow6432Node").OpenSubKey("ODBC").OpenSubKey("ODBC.INI", true).CreateSubKey(dsn);

            string driverPath = GetDriverDllPath();
            if (string.IsNullOrEmpty(driverPath))
            {
                return false;
            }
            string tcpIP = string.Format("host={0};port={1}", serverIP, port);
            regKey.SetValue("AutoStop", "YES");
            regKey.SetValue("Driver", driverPath);
            regKey.SetValue("CommLinks", "TCPIP{" + tcpIP + "}");
            regKey.SetValue("Debug", "No");
            regKey.SetValue("Compress", "No");
            regKey.SetValue("DisableMultiRowFetch", "No");
            regKey.SetValue("Description", description);
相关阅读 更多 +
排行榜 更多 +
宝宝欢乐农场

宝宝欢乐农场

休闲益智 下载
我的世界外进神器

我的世界外进神器

游戏工具 下载
飞虎队模拟器2

飞虎队模拟器2

飞行射击 下载