On 8/09/2010 12:53 AM, Hannu Pohjanpalo wrote:
> I did try the
> c:\windows\system32\odbcad32 program, and pressed Add... but it does
> not show any postgreSQL drivers.
That's the 64-bit version of the ODBC administrator. Yes, that's
confusing. The name is a holdover from the 16-bit to 32-bit Windows
transition, when "odbcadm" was the 16-bit version and a new 32-bit
versoin "odbcad32" was provided.
Apparently many apps and installers depend on odbcad32.exe having that
name and path, so Microsoft landed up being stuck with it despite the
stupid name. It's the same reason the "system32" directory is still
called that on 64-bit Windows.
See: http://support.microsoft.com/kb/942976
You'll see in that article that the 32-bit ODBC administrator is:
%systemdrive%\Windows\SysWoW64\odbcad32.exe
(which you can launch from "Start->Run" using the path above). You need
to use the 32-bit ODBC administrator to set up data sources for 32-bit
applications using 32-bit drivers.
That MSDN article also appears to say that you *cannot* use a 32-bit
ODBC driver in a 64-bit application. That means that you'll still only
be able to use the PostgreSQL ODBC driver with 32-bit applications until
a 64-bit ODBC driver is released. Apparently there's now 64-bit support
in the psqlODBC sources:
http://www.mail-archive.com/pgsql-annou...@postgresql.org/msg01822.html
Perhaps this needs to go in the psqlODBC FAQ?
http://psqlodbc.projects.postgresql.org/faq.html
Anyway: what app(s) do you want to use PostgreSQL with over ODBC? Are
they 32-bit or 64-bit builds?
I then looked at the registry and found that in
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI there were only these two
SQLServer entries but no postgreSQL entries (like there is in my Vista PC,
where the ODBC works fine).
Your vista machine - is it a 32 bit or 64 bit version of Vista? I'm
guessing 32-bit.
> Finally I found the PostgreSQL
entries in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI, but
obviously odbcad32.exe cannot find them no matter where these keys are.
AFAIK that's the right place for the registry entries. They're 32 bit
drivers, so they can't be used directly by 64-bit code, they have to run
via the wow64 layer.
Anyway, the database works well via pgAdmin III, but the ODBC does not.
That's because pgAdmin III uses libpq directly, it doesn't use ODBC.
That's also why you don't have to mess around configuring data sources.
> Has anyone got the ODBC working in a Windows 7 Pro 64 bit?
I don't use 64-bit Windows. I haven't seen many reports either way here,
but perhaps there's more discussion of it on the EnterpriseDB web
forums: http://forums.enterprisedb.com
--
Craig Ringer
Tech-related writing at http://soapyfrogs.blogspot.com/
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs