How to use a 32-bit ODBC driver in Win 2003 x64

  • Thread starter Thread starter caboclo975
  • Start date Start date
C

caboclo975

Guest
I have a 32-bit ODBC driver that I need to use in my application on Win
2003 x64 (I do not have a 64-bit driver available). I was able to set
up the DSN for the 32-bit driver by going to
"C:\WINDOWS\SysWOW64\odbcad32.exe". However, when I run my application
it does not find the DSN. I am assuming that this is because as a
64-bit application it is looking on the 64-bit side to find the correct
DSN and it isn't there. Is there a way that I can point to the 32-bit
drivers instead? Or is there something else I should be doing?

Thanks,
Daniel


--
caboclo975
------------------------------------------------------------------------
caboclo975's Profile: http://forums.techarena.in/member.php?userid=31442
View this thread: http://forums.techarena.in/showthread.php?t=821300

http://forums.techarena.in
 
Re: How to use a 32-bit ODBC driver in Win 2003 x64

caboclo975 wrote:

>
>I have a 32-bit ODBC driver that I need to use in my application on Win
>2003 x64 (I do not have a 64-bit driver available). I was able to set
>up the DSN for the 32-bit driver by going to
>"C:\WINDOWS\SysWOW64\odbcad32.exe". However, when I run my application
>it does not find the DSN. I am assuming that this is because as a
>64-bit application it is looking on the 64-bit side to find the correct
>DSN and it isn't there. Is there a way that I can point to the 32-bit
>drivers instead? Or is there something else I should be doing?


32-bit applications use 32-bit ODBC drivers, and 64-bit applications use
64-bit ODBC drivers.

AFAICT, never the twain shall meet.

--
Steve Foster [SBS MVP]
---------------------------------------
MVPs do not work for Microsoft. Please reply only to the newsgroups.
 
Re: How to use a 32-bit ODBC driver in Win 2003 x64


What if I run it on the x64 machine as 32-bit? In Visual Studio 2005
(C#) there is an option to set your build to run on a specific target.
I recently figured this out and got it to work (I also had to use
FILEDSN) on my x64 machine, for testing purposes.

So now (this might be getting out of topic of this thread) I need to
figure out how to make this code work as a trigger on SQL Server 2005
(which resides on x64 box). Anybody know anything about this or where
to point me?


--
caboclo975
------------------------------------------------------------------------
caboclo975's Profile: http://forums.techarena.in/member.php?userid=31442
View this thread: http://forums.techarena.in/showthread.php?t=821300

http://forums.techarena.in
 
Re: How to use a 32-bit ODBC driver in Win 2003 x64

On Fri, 21 Sep 2007 02:11:09 +0530, caboclo975
<caboclo975.2x89ng@DoNotSpam.com> wrote:

>
>What if I run it on the x64 machine as 32-bit?
>


You can not mix 32-bit applications with 64-bit DLLs and vice versa.

The Windows platform SDK says:
>>

On 64-bit Windows, a 64-bit process cannot load a 32-bit dynamic-link
library (DLL). Additionally, a 32-bit process cannot load a 64-bit
DLL. However, 64-bit Windows supports remote procedure calls (RPC)
between 64-bit and 32-bit processes (both on the same computer and
across computers). On 64-bit Windows, an out-of-process 32-bit COM
server can communicate with a 64-bit client, and an out-of-process
64-bit COM server can communicate with a 32-bit client. Therefore, if
you have a 32-bit DLL that is not COM-aware, you can wrap it in an
out-of-process COM server and use COM to marshal calls to and from a
64-bit process.
<<

---
Stefan Pendl
 
Re: How to use a 32-bit ODBC driver in Win 2003 x64

caboclo975 wrote:

>
>What if I run it on the x64 machine as 32-bit? In Visual Studio 2005
>(C#) there is an option to set your build to run on a specific target.
>I recently figured this out and got it to work (I also had to use
>FILEDSN) on my x64 machine, for testing purposes.


You mean build the app as 32-bit, and run it on x64? That should be fine.
Then it's a 32-bit application and will use the 32-bit ODBC.


>So now (this might be getting out of topic of this thread) I need to
>figure out how to make this code work as a trigger on SQL Server 2005
>(which resides on x64 box). Anybody know anything about this or where
>to point me?


If you're writing CLR code for SQL2005, then it's .Net based and should
work with either. But I'm not a CLR-in-SQL expert - you should probably
subscribe to the relevant SQL newsgroups.

--
Steve Foster [SBS MVP]
---------------------------------------
MVPs do not work for Microsoft. Please reply only to the newsgroups.
 
Back
Top