cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting to ASA 9 on Windows 7 with code

Former Member
3,961

Hello, I have had no success with connecting to an Adaptive Server Anywhere 9.0.2 on a windows 7 64 bit system in my .NET code. I think my problem is that I'm not sure how to tell it to look in the 32-bit odbc for my DSN. If I open the 32 bit odbc (from the syswow) folder, I can see my databases, but if I open the 64-bit odbc then they are not there. So I am thinking that when my code is accessing odbc, it is actually looking at the 64-bit and not the 32-bit. Does anybody know of any sample code to do this? Thanks in advance for any help.

Accepted Solutions (0)

Answers (2)

Answers (2)

MCMartin
Participant

The usage of the 64 or 32 bit ODBC settings under Win 7 64 bit depends on your executable. So if the program you are running is a 64 bit program it will use the 64 bit ODBC settings. If your program is a 32 bit executable it will use the 32 bit ODBC settings.

So based on the architecture of your process you will have to set the according (64 or 32) ODBC entries.

And remember a 64 bit client can access a 32 bit db server and vice versa.

VolkerBarth
Contributor

Well, I'm not .NET expert but AFAIK if your .NET application should always run as a 32 bit application (and as such, will read the 32 bot DSNs), it should be built with /platform:x86 (instead of the usual /platform:anycpu).

Some more helpful info might be found in this FAQ.