RE: Solution to Missing or Hidden System DSN
- From: Tom Garth <TomGarth@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 23 Jun 2007 09:15:01 -0700
Ming,
You are welcome. Theat information came to me from Microsoft:
Radu Grama, MCSD.NET, MCDBA
Support Engineer
Developer Support Database
--
Tom Garth
"Pak-Ming Cheung [MSFT]" wrote:
Hi Tom,.
Thanks for your information. I can reproduce the problem on my XP SP2 now.
However, the problem has been fixed in later version of OS, say W2K3 SP2,
Vista.
Thanks,
Ming.
"Tom Garth" wrote:
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.
- References:
- RE: Solution to Missing or Hidden System DSN
- From: Pak-Ming Cheung [MSFT]
- RE: Solution to Missing or Hidden System DSN
- From: Tom Garth
- RE: Solution to Missing or Hidden System DSN
- From: Pak-Ming Cheung [MSFT]
- RE: Solution to Missing or Hidden System DSN
- Prev by Date: Re: HOW TO ENABLE ENCRYPTION ON SQL SERVER 2005
- Next by Date: RE: How to retrieve the current ODBC settings from a connection?
- Previous by thread: RE: Solution to Missing or Hidden System DSN
- Next by thread: RE: ODBC driver for SQL Server 2005 doesn't allow binding SELECT NULL
- Index(es):
Relevant Pages
|