Solved

Finding Data Source Name

Posted on 1999-01-20
3
169 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
  • 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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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 video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now