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? asked 24 Feb '11, 17:17 Breck Carter Volker Barth |
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. -john. answered 24 Feb '11, 19:55 John Smirnios @John: "...if you see the Excel, Foxpro, DBase, etc drivers, then it is 32-bit." - Do you know if this is still true (w.r.t. Excel) for Office 2010 64-bit versions? (No, I don't own one...) @John: Thanks for pointing out the User DSN "replication" - I wasn't aware of that (bad?) "magic" at all. 1
This is making me feel better, where "better" means "less alone", not smarter or anything like that :) 1
@Volker: I'm using Office 2007 so, yes, newer versions of Office may have 64-bit drivers. Thanks for pointing that out. Taskmgr is a reliable way of knowing the bitness of a process. |
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 Justin Willey |
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 carolstone |
Just an addition - for further reference: The newly-discovered SQL Anywhere Insider magazine has an in-depth article on this topic: January 2011 Edition: Working with ODBC DataSources on Microsoft® Windows® (32-bit versus 64-bit) answered 23 Mar '12, 08:31 Volker Barth |