RE: Solution to Missing or Hidden System DSN

Tech-Archive recommends: Speed Up your PC by fixing your registry



Actually the problem more likely exists in one or more of the drivers listed
in: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI

I understand that the other registry entry (HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC
Data Sources) can cause the same issue though.

I just resolved that exact problem with help from MS Windows Technical
Support. In their words:
**************************
Problem – The customer cannot create DSNs based on the SQL Native Client
ODBC driver because the SQL Native Client ODBC driver does not show in ODBC
Data Source Administrator.

Environment – Windows XP Pro SP2

Root Cause – It appears that HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI
and some of its sub-keys contained an empty value for the (Default) REG_SZ,
when in fact they should have contained (value not set).

Resolution – If this re-occurs the steps are:

· Determine if HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI and/or
any of its sub-keys, showed an empty value for the (Default) REG_SZ, when in
fact they should have shown (value not set).

· Removed all (Default) REG_SZs in
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI and its sub-keys that had the
empty value and verified that (Default) REG_SZs with the value (value not
set) were automatically re-created.
****************************
For what it is worth, I'm pretty sure that if you created your DSN directly
in the registry, it would work just fine.

--
Tom Garth


"Pak-Ming Cheung [MSFT]" wrote:

Hi,

Are you sure that the empty (default) value in
"HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources"
makes odbcad32.exe display nothing in "System DSN" tab?

I have just tested this on my WinXP SP2 but I cannot reproduce your
described problem. What I have done are:
1. Start Registry Editor by typing "regedit.exe" in command prompt
2. Browse to "HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources", double-click
(Deafult) and then click "OK" without typing anything in the textbox.
3. I confirmed that the value becomes "empty" (not "value not set") in
regedit.
4. Start ODBC Data Source Administrator by typing "odbcad32.exe" in command
prompt
5. Click the tab "System DSN"
6. I can still see my system DSNs without any problem.

Could you give me more detailed step-by-step procedures to reproduce your
described issue? We are interested to find out whether this is a bug in our
code.

Thanks in advance,
Ming.
MDAC Team, Microsoft.



"jonp.uk@xxxxxxxxx" wrote:

I'm not sure if anyone has posted the solution to this, but I see
plenty of posts about missing System DSN's that work ok and appear to
be fine in the registry, but just don't appear in the Data Source
Administrator in Control Panel. I've experienced the problem myself
today and have also found the cause and workaround solution.

The problem is caused by the (Default) REG_SZ value in HKLM\SOFTWARE
\ODBC\ODBC.INI\ODBC Data Sources containing an empty string instead of
being completely null. Values created after that value was set to an
empty string will not appear in the Administrator

To fix the problem, delete the (Default) value. Windows will
immediately recreate it. You should see (value not set) instead of
empty space.

If you subsequently try to edit the (Default) value and just click ok
without inputting anything, the value reverts to an empty string. Your
original missing DSN will still show in Control Panel, but any new
ones you create will be hidden until you correct the (Default) key
again.

For additional information, I have found that reg.exe creates empty
(Default) values when you use it to create a new Key. This testing was
performed on W2K3 SP1 and XP SP2

I have also found that certain configuration values within existing
DSN entries can also be hidden due to the same problem within the
various ODBC keys. The bottom line is that the Data Source
Administrator does not like empty string (Default) values and stops
reading the registry once it encounters one.


.



Relevant Pages

  • RE: Solution to Missing or Hidden System DSN
    ... Data Sources) can cause the same issue though. ... and some of its sub-keys contained an empty value for the REG_SZ, ... I'm pretty sure that if you created your DSN directly ... Start ODBC Data Source Administrator by typing "odbcad32.exe" in command ...
    (microsoft.public.data.odbc)
  • RE: Solution to Missing or Hidden System DSN
    ... I can reproduce the problem on my XP SP2 now. ... Data Sources) can cause the same issue though. ... and some of its sub-keys contained an empty value for the REG_SZ, ... I'm pretty sure that if you created your DSN directly ...
    (microsoft.public.data.odbc)
  • RE: Solution to Missing or Hidden System DSN
    ... Are you sure that the empty value in ... makes odbcad32.exe display nothing in "System DSN" tab? ... empty string will not appear in the Administrator ...
    (microsoft.public.data.odbc)
  • Re: Viewing machine data source names
    ... zdrakec wrote: ... For Each s As String In odbcNames ... Just remember that the "ODBS Data Sources" sub key is a special sub key ... that does not define a DSN, but contains the current list of DSNs. ...
    (microsoft.public.dotnet.languages.vb)
  • RE: Problem installing DBD::ODBC 1.13
    ... >data sources defined, yet it seems that you are using a DSN to connect. ... 5|gt250char|THIS IS A STRING LONGER THAN 80 CHARS. ... test connection success when DBI DSN is invalid ...
    (perl.dbi.users)