Missing (Hidden) ODBC Data Sources

Have you ever created an ODBC System DSN, only to watch as it doesn't appear in the list in the ODBC Data Source Administrator control panel? I recently used a PC (Windows XP SP2) where the registry showed that new DSNs were being successfully created, but the dialog refused to display them.

The real problem was that I was creating the DSNs for use in a Crystal report, and they weren't showing up in the list of available DSNs in the Crystal designer either.

This doesn't seem to be a very common problem, but I did eventually find evidence that other people had suffered from and fixed the same issue.

Under the HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources key there's a string value called (Default), which should be be empty: it will display as (value not set) in the list view:

Default shown in a list

or as a blank string if you open up the dialog to modify the data:

Default shown in a dialog

The key point here is that the data is not a blank string, and is not the text "(value no set)" which one blogger found! It must be set to the registry equivalent of NULL.

The problem can easily be recreated by clicking OK on the above dialog, rather than cancel. If you do this you'll notice that (value not set) disappears from the list view, as the empty value is replaced by a blank string:

Any new ODBC System DSNs will now fail to appear in the Administrator dialog, even though they are stored in the registry.

To fix the problem, simply delete the (Default) value. It will be instantly recreated as (value not set), and if you re-open the Administrator dialog then all of your DSNs will now be visible. They will also show up in other applications like the Crystal designer.

Published 30 October 2008 09:02 PM by jonsayce
Filed under:


No Comments