#------------------------------ Excerpt: Windows version-specific issues Can I install a 32-bit PostgreSQL on 64-bit Windows?
Recent 32-bit versions of PostgreSQL (8.3 and newer) can be installed and used on 64-bit Windows XP and above, though they retain the 32-bit limits on maximum process address space (and thus shared memory). You can connect to the 32-bit postgresql server from 64-bit programs on the computer the server is running on or other computers if a 64-bit libpq or psqlODBC driver is installed where the program is running. Because 32-bit versions of the PostgreSQL server only install a 32-bit libpq and pgsqlODBC, only 32-bit programs on the computer the server was installed on can use the database unless a 64-bit ODBC driver or libpq is installed as an add-on. Where is the PostgreSQL ODBC driver? I'm running 32-bit PostgreSQL on 64-bit Windows You need to use the 32-bit ODBC administrator to set up data sources for 32-bit applications using 32-bit drivers. Unless you've also installed a 64-bit version of psqlODBC, a 32-bit install of PostgreSQL will only have a 32-bit ODBC driver. The 32-bit ODBC driver may only be used by 32-bit programs, and will not show up in the 64-bit ODBC administrator. This gets confusing because on 64-bit windows c:\windows\system32\odbcad32 is the 64-bit ODBC driver administrator, despite the name. This is a historical artifact of Windows development. Apparently many apps and installers depend on odbcad32.exe having that name and path, so Microsoft landed up being stuck with it despite the now-stupid name, which made sense back in the 16- to 32-bit transition but makes none now. It's the same reason the "system32" directory is still called that on 64-bit Windows. PostgreSQL can't do anything about this. See: http://support.microsoft.com/kb/942976 You'll see in that article that the 32-bit ODBC administrator on 64-bit Windows is: %systemdrive%\Windows\SysWoW64\odbcad32.exe You can launch this from "Start->Run" using the path above. You will see the PostgreSQL ODBC drivers in the 32-bit ODBC administrator. You 'can not' 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 unless you install a 64-bit ODBC driver as well. Can I use a 64-bit ODBC program with a 32-bit PostgreSQL server? Only if you have a 64-bit [1] driver installed. See the installation section. http://wiki.postgresql.org/wiki/Running_&_Installing_PostgreSQL_On_Native_Windows #------------------------------- Regards, LelandJ On 12/14/2010 04:12 AM, Iames Pizzoli wrote: > Hi all, > > > > I'm trying to connect to a remote PostgreSQL 8.3.4 server on > Debian 4.1.1 (32 bit) using this: > > > > handle = SQLSTRINGCONNECT("DRIVER=PostgreSQL > ANSI(x64),UID=xxxxx,PWD=xxxxx,DATABASE=xxxxx,SERVER=xxx.xxx.xxx.xxx") > > > > I's returning -1. If I use pgAdmin III 1.12.1 with these values I can > connect OK. This string is the same (well, sort of., read on) used by my app > installed at my customer's site where dozens of clerks every day input a lot > of data. Now they want some changes in some forms, so I'm trying to restore > the environment on my PC. Recently I switched to Win 7 Pro 64 bit, so > installed the new PostgreSQL 9.0.1 64 bit, and psqlODBC 9.0.1 64 bit. > > > > The '(x64)' part in DRIVER parameter is the only thing different from what > they use. And is what I suspect is the culprit here. Can I connect from a 64 > bit driver to a 32 bit server? And if I can't, am I forced to install a 32 > bit PostgreSQL release with a 32 bit psqlODBC driver on my 64 bit OS to be > able to connect? And in this case, should this be an old 8.x release or a > recent 9.x one? > > > > Thanks to the kind souls who'll want to shed some light on this. ;o) > > > > Iames > > > > > > > -- > Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP > autenticato? GRATIS solo con Email.it http://www.email.it/f > > Sponsor: > Prova subito Emailpaghe, e' in prova gratuita sino al 31 dicembre 2010 > Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=10679&d=14-12 > > > --- StripMime Report -- processed MIME parts --- > multipart/alternative > text/plain (text body -- kept) > text/html > --- > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

