Solved

Finding Data Source Name

Posted on 1999-01-20
3
174 Views
Last Modified: 2013-11-20
Dear Experts,
i want to list the dsn entries in my system in a combo box. From where i can read the dsn entries?. if they are in the registry, how can i retrive without knowing the registry key name
thanks in advance
regards
subbs
0
Comment
Question by:subbaiah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
MelissaC earned 20 total points
ID: 1328081
Hi Subbaiah,
The DSN on a machine can be found in the registry:
HKEY_LOCAL_MACHINE/SOFTWARE/ODBC.
If you use CRecordset::Open(...) without specifying a DSN, the Windows DSN-dialog (like in Control Panel) will be displayed so the user can choose a DSN by himself.
Hope this helps.
0
 
LVL 1

Author Comment

by:subbaiah
ID: 1328082
Hai MelissaC,
Thank u for ur reply, but i want to implement the same functionality for some other purpose, can u please give more details to read the dsn entries

0
 
LVL 2

Expert Comment

by:MelissaC
ID: 1328083
Hi Subbaiah,
take a look at:
http://www.codeguru.com/system/navigating_registry.shtml
there's a good explanation about the registry. I think the topic you need is iteration. (GetFist, GetNext, etc). This way you can find all subkeys of HKEY_LOCAL_MACHINE/SOFTWARE/ODBC.
Good luck!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
notReplace  challenge 53 151
format the code in java 6 110
fizzArray2 challenge 1 102
building a service to accessed via telnet client, want colors ? 4 98
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question