在 Windows 上设置 PostgreSQL ODBC
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6796252/
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
Setting up PostgreSQL ODBC on Windows
提问by IamIC
I have the latest 64 bit version of PostgreSQL. I am running Win 7 64 bit. I had installed the ODBC driver (via the initial installer) when I installed PG, and upgraded it to the latest version from http://www.postgresql.org/ftp/odbc/versions/msi/.
我有最新的 64 位版本的 PostgreSQL。我正在运行 Win 7 64 位。我在安装 PG 时已经安装了 ODBC 驱动程序(通过初始安装程序),并将其从http://www.postgresql.org/ftp/odbc/versions/msi/升级到最新版本。
However, when I go to the ODBC control panel and try to add a User DSN, PostgreSQL isn't listed as a server.
但是,当我转到 ODBC 控制面板并尝试添加用户 DSN 时,PostgreSQL 并未列为服务器。
I was following the instructions given here, but I noted the links are dated.
我按照此处给出的说明进行操作,但我注意到链接已过时。
回答by Grzegorz Szpetkowski
As I see PostgreSQL installer doesn't include 64 bit version of ODBC driver, which is necessary in your case. Download psqlodbc_09_00_0310-x64.zipand install it instead. I checked that on Win 7 64 bit and PostgreSQL 9.0.4 64 bit and it looks ok:
正如我所见,PostgreSQL 安装程序不包含 64 位版本的 ODBC 驱动程序,这在您的情况下是必需的。下载psqlodbc_09_00_0310-x64.zip并安装它。我在 Win 7 64 位和 PostgreSQL 9.0.4 64 位上检查过,它看起来没问题:
Test connection:
测试连接:
回答by TSMurphy
Installing psqlODBC on 64bit Windows
在 64 位 Windows 上安装 psqlODBC
Though you can install 32 bit ODBC drivers on Win X64 as usual, you can't configure 32-bit DSNs via ordinary control panel or ODBC datasource administrator.
虽然您可以照常在 Win X64 上安装 32 位 ODBC 驱动程序,但您无法通过普通控制面板或 ODBC 数据源管理员配置 32 位 DSN。
How to configure 32 bit ODBC drivers on Win x64
如何在 Win x64 上配置 32 位 ODBC 驱动程序
Configure ODBC DSN from %SystemRoot%\syswow64\odbcad32.exe
从 %SystemRoot%\syswow64\odbcad32.exe 配置 ODBC DSN
- Start > Run
- Enter:
%SystemRoot%\syswow64\odbcad32.exe
- Hit return.
- Open up ODBC and select under the System DSN tab.
- Select PostgreSQL Unicode
- 开始 > 运行
- 进入:
%SystemRoot%\syswow64\odbcad32.exe
- 按回车。
- 打开 ODBC 并在系统 DSN 选项卡下选择。
- 选择 PostgreSQL Unicode
You may have to play with it and try different scenarios, think outside-the-box, remember this is open source.
您可能不得不尝试使用它并尝试不同的场景,跳出框框思考,记住这是开源的。
回答by Patrick
Please note that you must install the driver for the version of your software client(MS access) not the version of the OS. that's mean that if your MS Access is a 32-bits version,you must install a 32-bit odbc driver. regards
请注意,您必须为您的软件客户端(MS 访问)版本而不是操作系统版本安装驱动程序。这意味着如果您的 MS Access 是 32 位版本,您必须安装 32 位 odbc 驱动程序。问候
回答by Rushikesh
First you download ODBC driver psqlodbc_09_01_0200-x64.zip then you installed it.After that go to START->Program->Administrative tools then you select Data Source ODBC then you double click on the same after that you select PostgreSQL 30 then you select configure then you provide proper details such as db name user Id host name password of the same database in this way you will configured your DSN connection.After That you will check SSL should be allow .
首先你下载 ODBC 驱动程序 psqlodbc_09_01_0200-x64.zip 然后你安装它。然后去开始->程序->管理工具然后你选择数据源 ODBC 然后你双击它,然后你选择 PostgreSQL 30 然后你选择配置然后您提供适当的详细信息,例如同一数据库的 db name user Id host name password,您将通过这种方式配置 DSN 连接。之后您将检查 SSL 应允许。
Then you go on next tab system DSN then you select ADD tabthen select postgreSQL_ANSI_64X ODBC after you that you have created PostgreSQL ODBC connection.
然后进入下一个选项卡系统 DSN,然后选择添加选项卡,然后在创建 PostgreSQL ODBC 连接后选择 postgreSQL_ANSI_64X ODBC。