PostgreSQL 9.1 ODBC 的 32 位和 64 位版本混在一起
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10893433/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
32bit and 64bit Versions of PostgreSQL 9.1 ODBC are Mixed Up
提问by minus34
I've installed both the 32bit and 64bit versions of psqlODBC 9.1. When I configure both a 32bit and a 64bit System DSN they get written to the ODBC.ini file incorrectly:
我已经安装了 psqlODBC 9.1 的 32 位和 64 位版本。当我同时配置 32 位和 64 位系统 DSN 时,它们会错误地写入 ODBC.ini 文件:
[ODBC 32 bit Data Sources] pg_crdb_latest=PostgreSQL Unicode (32 bit) pg_crdb_latest_32=PostgreSQL Unicode(x64) (32 bit) [pg_crdb_latest] Driver32=C:\Program Files (x86)\psqlODBC01\bin\psqlodbc35w.dll [pg_crdb_latest_32] Driver32=C:\Program Files\psqlODBC01\bin\psqlodbc35w.dll
[ODBC 32 bit Data Sources] pg_crdb_latest=PostgreSQL Unicode (32 bit) pg_crdb_latest_32=PostgreSQL Unicode(x64) (32 bit) [pg_crdb_latest] Driver32=C:\Program Files (x86)\psqlODBC01\bin\psqlodbc35w.dll [pg_crdb_latest_32] Driver32=C:\Program Files\psqlODBC01\bin\psqlodbc35w.dll
The pg_crdb_latestDSN was added using the 64bit ODBC Data Source Administrator. The pg_crdb_latest_32DSN was added with the 32bitone.
该pg_crdb_latestDSN是使用添加64位ODBC数据源管理。该pg_crdb_latest_32与添加的DSN 32位之一。
FYI - I installed the 32bit version first, then the 64bit version.
仅供参考 - 我先安装了 32 位版本,然后是 64 位版本。
The outcome is I get this error when trying to connect to PostgreSQL 9.1 64bit in SAS 9.2 64bit:
结果是在 SAS 9.2 64bit 中尝试连接到 PostgreSQL 9.1 64bit 时出现此错误:
ERROR: CLI error trying to establish connection: [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
错误:尝试建立连接的 CLI 错误:[Microsoft][ODBC 驱动程序管理器] 指定的 DSN 包含驱动程序和应用程序之间的体系结构不匹配
Any ideas how to set this right? I'm running Windows 7 Pro 64bit.
任何想法如何设置正确?我正在运行 Windows 7 Pro 64 位。
回答by minus34
This link explains it all
这个链接说明了一切
http://www.easysoft.com/developer/interfaces/odbc/64-bit.html#odbc-windows
http://www.easysoft.com/developer/interfaces/odbc/64-bit.html#odbc-windows
So two things:
所以两件事:
- Windows has very poor file and directory naming conventions regarding ODBC - hence the confusion
- 64bit PostgreSQL ODBC is currently very slow (10x slower than SAS to SQL 64bit via OLEDB) - I'll investigate this further
- Windows 对 ODBC 的文件和目录命名约定非常差 - 因此混淆
- 64 位 PostgreSQL ODBC 目前非常慢(比 SAS 到 SQL 64 位通过 OLEDB 慢 10 倍)-我将进一步调查