I'm having zero luck getting the ODBC Administrator to work reliably with earlier versions of SQL Anywhere in Windows 7... one symptom is that Test Connect doesn't work, another is that the new DSN doesn't show up, another is the existing DSNs don't show up in the ODBC Administrator... soon, my head will be exploding.
The SQL Anywhere dbdsn utility seems to work just fine, and is a nice workaround for creating DSNs... and the old versions of SQL Anywhere are working fine (for my purposes), all the way back to 5.5.
Can someone please explain what the whole story is, with C:\Windows\system32\odbc32adm.exe versus C:\Windows\SysWOW64\odbcad32.exe versus whatever-other-versions-might-be-lurking?
I have a few things to add to what Justin posted but the size & formatting constraints on comments are annoying.
regsvr32 nowadays will automatically reinvoke the correct bitness of itself to match the DLL that you are registering.
It is very important always to use a fully qualified, absolute path to the DLL that you want to register or unregister.
There's some Microsoft Magic behind the scenes too. If both a 32-bit and a 64-bit version of an ODBC driver are registered with the same driver name (which is what SQLAnywhere does if you install both drivers), Microsoft treats them as equivalent except, of course, for bitness. That means, for example, you can create a 32-bit User DSN with the 32-bit odbcad32 then manage it with the 64-bit odbcad32. If only one bitness of driver is registered, you can only manage the DSN with the correct bitness of odbcad32. I recall that the installer team also noted that changing DSN information in the registry caused the OS to replicate the changes to other mystical areas in the registry and to reconcile the 32-bit & 64-bit versions of the registry. I remember watching it all happen in procmon and it was quite dizzying. It was problematic because the installer tool we used at the time monitored registry changes during a sample run then basically just replayed them for a real install. Of course, the install tool got very confused by the nonsense going on behind the scenes.
32-bit and 64-bit system DSNs seem to be kept separate: system DSNs created with the 32-bit odbcad32 never appear in the 64-bit odbcad32 and vice-versa.
To determine which version of odbcad32 you are using, look for odbcad32.exe in the Processes list of taskmgr and see if it has a " *32" after odbcad32.exe indicating that it is a 32-bit executable. Alternatively, just try adding a DSN: if you see the Excel, Foxpro, DBase, etc drivers, then it is 32-bit.
answered 24 Feb '11, 19:55
John Smirnios posted this a while ago on the general forum (relating to 2008 server I think - but it's the same in 7 I believe):
as I said at the time:
This does sound like another trimuph of the MS usability labs doesn't it - odbcad32.exe that'll be the 64 bit version then, err... unless it isn't.
answered 24 Feb '11, 17:27
In SQL Anywhere 10, I found three reliable ways to avoid the problem.
One is to always use the shortcut to the ODBC Administrator from within the connection window in the Sybase tool (such as ISQL or SCJView). That seems to always pick the correct one. My guess is this works because these programs are 32-bit programs themselves and can't use the 64-bit tools, either.
Another is to go to the WINDOWS\SysWOW64 folder and run odbcad32.exe. This is a pain because we occasionally forget and spend a silly amount of time trying to figure out why the ODBC tools are behaving in an inconsistent manner.
Finally, I see you've stumbled on same solution I finally found, which is to use the dbdsn command. This works flawlessly for us every time.
I'd love to be able to issue a personal thank you to whoever put dbdsn in the toolkit in the first place. It's really useful.
answered 10 Mar '11, 21:20
Just an addition - for further reference:
The newly-discovered SQL Anywhere Insider magazine has an in-depth article on this topic: