Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Finding Data Source Name

Posted on 1999-01-20
3
Medium Priority
?
177 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 40 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Suggested Courses

610 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