The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

On a freshly built PC running Windows 7, I have installed SQL Anywhere 12. I set up an ODBC System DSN using the Sybase 32 bit ODBC Administrator that was installed with SQL Anywhere 12.

Everything works just fine until I soft reboot (restart). Then I can not connect to the database. I receive the error message "Could not connect to the database. The ODBC driver manager could not find the data source. The SQL Anywhere ODBC drive is not correctly installed.".

If I then go into the above mentioned ODBC Administrator and delete the System DSN and recreate it everything works fine (until I reboot). If I simply go into configure for the one that is failing, make a cosmetic change and then save it, this will not resolve the problem. However, if I simply rename one that had failed on a previous test iteration, it will now work.

It is as if the DSN I set up is active in memory or some kind of cache but not really being written to the registry.

Any ideas?

asked 06 Feb '13, 12:41

Stockport's gravatar image

accept rate: 0%

Did you install both the 32-bit and 64-bit ODBC drivers? Sometimes it helps. Microsoft has implemented a lot of magic behind the scenes to deal with DSNs to avoid (or, unfortunately in some cases, create) bitness problems.

If you have both a 32-bit and 64-bit version of the ODBC driver installed, they will have the same driver "name" and applications of both bitness can then see DSNs regardless of the bitness of the driver manager used to create them. Behind the scenes, the OS replicates portions of the DSNs and alters the path to the ODBC driver as necessary based on the bitness of the application.

permanent link

answered 06 Feb '13, 14:24

John%20Smirnios's gravatar image

John Smirnios
accept rate: 40%

Thanks John. I'll play with that possibility. In my SQL Anywhere 12 installation I only selected the 32bit options and did not install the 64 bit options.

I have done an additional experiment that I think leads me in the direction of the root cause. If I turn off UAC and recreate the 32 bit ODBC System DSN, then everything works just fine. The minute I restore any level of UAC the problem emerges again (after I restart).

The message I received from Windows when I set the UAC to "never notify" (control panel | User Accounts | Change User Account Control settings) was "Not recommended. Choose this only if you need to use programs that are not certified for Windows 7 because they do not support User Account Controls." I should mention that all of what I have described is as a user with admin rights (which I now understand is very different in Windows 7 than previous versions of the OS).

I still have a lot of work to do here, but this is the latest update.

(06 Feb '13, 22:41) Stockport
Replies hidden

Interesting. odbcad32 doesn't request elevation when it starts and that surprises me. You shouldn't be able to create system DSNs without being elevated. Maybe the OS somehow allows temporary ones to be defined without elevation? I have never noticed that before.

With UAC enabled, you can run odbcad32 elevated by finding its executable (via the Start menu or via file File explorer), right-click, then "Run as Administrator". Alternatively, you can use the "dbdsn -ws" commmand line tool provided with SQLAnywhere. It will request elevation as needed.

(07 Feb '13, 09:08) John Smirnios
Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 06 Feb '13, 12:41

question was seen: 1,898 times

last updated: 07 Feb '13, 09:08