cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Well, a few months ago I asked for help and totally got so frustrated I gave up. But, now I really have to try and figure this out. Situation: Accessing a SQL Anywhere 9.0 database System DSN created by a third party software program that is a 32 bit program.

  • In the Vb.net program I can interrogate the registry syswow64 and retrieve the ODBC DSN.
  • In the odbc64 Data Source Administrator I can see the system dsn.
  • I can log on to the database.
  • In the task manager the program that is running is odbcad32.exe *32

When I try to connect with the following connect string:

dbConn.ConnectionString = "DSN=" & Form1.gsODBC & ";UID=" & Form1.gsLoginName & ";PWD=" & Form1.gsLoginPass
E. Err: The specified DSN contains an architecture mismatch between driver and application I've tried
dbConn.ConnectionString = {Siebel Database};DSN=SSD Local Db default instance;UID=DBA;PWD=SQL
and it still does not work. So somehow when I do the dbOpen with the connectstring how do I insure that I go against the 64bit odbc directory to connect the same as I do when I'm in the odbc64 Data Source Administrator. Any Clues?--

View Entire Topic
Former Member
0 Likes

Well after all this and making so many changes to the program went back to the original program and changed the advance compile set it to x86 as suggested and low and behold the program found my 32 bit DSN and program worked.

Thank-you Ron. It's not elegant but I know the vendor will not be changing the database version for sometime.

Chris, Volker and Reimer thank-you too for being patient. Still weird -

When a 32-bit program finds and correctly uses 32-bit DS, it is not "weird", it is "works as expected" ;).

chris_keating
Product and Topic Expert
Product and Topic Expert

This is working exactly as expected and designed. An application compiled with 'Any CPU' allows a .NET managed application to be CPU agnostic. This allows applications to be complied once and run on any .NET environment without code changes on x86, x64, or IA64 (Itanium) operating sysems without the need to compile for each of those chips. Your application is not completely managed code as it has dependencies on native client software (the ODBC layer and the ODBC driver). The application must reference the native components in the same bitness that it is running. In the absence of x64 ODBC drivers and DSN for the application, you had to compile it as 32 bit. If you had a 64 drivers, you could have created a 64 bit DSN and the application could run with 'Any CPU'.

The Wow6432Node is "Windows on Windows64 32 bit". It means that it is the 32 bit registry. The same is true for the SysWOW64 which contains 32 bit Windows System files. So, you were correct that was the node to use for 32 bit DSNs but the application was running as 64 bit so was not using that node.

Former Member

Thanks for everyone - after reading all the answers and suggestions it totally makes sense. The program's database I'm trying to access is a 32 bit program that is running on a 64 bit machine. Not be a true VB.net programmer but more of a hacker it took me a long time to tie all the pieces together and use that x86 compiler instructions so that the program runs the same as the one that I'm trying to access their SQL Anywhere database.

So, many many thanks to everyone - really appreciate it. It'll be a lesson hard learned but NEVER, EVER forgotten.

Again one more time - thank-you.