Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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.

asked 14 Aug '11, 10:53

babreu417's gravatar image

babreu417
16112
accept rate: 0%


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.

permanent link

answered 16 Aug '11, 03:56

Martin's gravatar image

Martin
9.0k130169257
accept rate: 14%

edited 16 Aug '11, 03:57

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.

permanent link

answered 14 Aug '11, 16:56

Volker%20Barth's gravatar image

Volker Barth
40.2k361550822
accept rate: 34%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×145
×108
×76

question asked: 14 Aug '11, 10:53

question was seen: 3,615 times

last updated: 16 Aug '11, 05:22