Re: 32 bit ODBC in Win XP x64?
- From: "Bill Cohagan" <cohagan@xxxxxxxxxxxxx>
- Date: Fri, 9 Mar 2007 13:35:53 -0600
Walter
Thank you for your response and for taking the time to work through this.
If I understand correctly what you did then it does NOT actually correspond
to our situation. In your case you created the 32 bit DSN on machine B (the
x64 "client") and connected to the SQL Server 2000 database on machine A, a
32 bit machine/OS.
In our case both the client and the server are 64 bit machines. In fact
for testing purposes they are the same machine, running Win XP Pro x64. The
database in question is a 32 bit app and the "client" (written in c# 2.0 and
playing the same role as your VB6 program) is also a 32 bit app. The
PostgreSQL ODBC driver is also a 32 bit driver. I created a system DSN using
C:\Windows\SysWOW64\odbcad32.exe and it is visible within that applet if I
rerun it. I also find the DSN in the registry at
"HKLM\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\PostgreSQL Unicode" which is indeed
the name given to the DSN at creation.
My application however fails with the
Data Source Name not found
error. My concern is that I have a 32 bit client trying to talk to a 32 bit
(PostgreSQL) ODBC driver via Microsoft's 64 ODBC implementation on the x64
machine. So, my first request is to determine whether this is *expected* to
work. If yes, then I need to perform further troubleshooting to determine
what I'm doing wrong.
Thanks,
Bill
"Walter Wang [MSFT]" <wawang@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:D3Mbp1LYHHA.3820@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi Bill,
I've tested this on my side using following environment:
* A: sql server 2000 database 'pubs' on windows 2003 x86
* B: windows 2003 x64
* C: windows xp x86
I created a odbc dsn on C named 'pubs' to connect to the db on A; and
created a simple VB6 program to use this dsn:
Dim cnt As New ADODB.Connection
cnt.Open "dsn=pubs"
On B: I first use the 64-bit odbcad32.exe to add a dsn named 'pubs' to
connect to the db on A, copied over the 32-bit VB6 application to test it,
it reports following error (as expected):
[Microsoft][ODBC Driver Manager] Data Source name not found and no default
driver specified.
Then I use the 32-bit odbcad32.exe to add a dsn named 'pubs' again, this
time the application runs correctly.
It's my understanding that the odbc dsn is stored in registry. Please note
when 32-bit application reads/writes registry, the Registry Redirection
will kick in and the values actually are redirected to
HKLM\Software\WOW6432node. For example, by default a system dsn will be
stored at HKLM\Software\ODBC\ODBC.INI\; on x64, 32-bit odbcad32.exe will
store the dsn at HKLM\Software\WOW6432node\ODBC\ODBC.INI\.
(Please refer to http://support.microsoft.com/kb/896459 for more
information on Registry Redirection on x64)
I'm not familiar with PostgreSQL, does it store the dsn information in
other place?
Regards,
Walter Wang (wawang@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
.
- Follow-Ups:
- Re: 32 bit ODBC in Win XP x64?
- From: Walter Wang [MSFT]
- Re: 32 bit ODBC in Win XP x64?
- References:
- 32 bit ODBC in Win XP x64?
- From: Bill Cohagan
- RE: 32 bit ODBC in Win XP x64?
- From: Walter Wang [MSFT]
- Re: 32 bit ODBC in Win XP x64?
- From: Bill Cohagan
- Re: 32 bit ODBC in Win XP x64?
- From: Walter Wang [MSFT]
- 32 bit ODBC in Win XP x64?
- Prev by Date: x64 ODBC CSV Drivers
- Next by Date: Re: MS ODBC and Null terminated strings
- Previous by thread: Re: 32 bit ODBC in Win XP x64?
- Next by thread: Re: 32 bit ODBC in Win XP x64?
- Index(es):
Relevant Pages
|