• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • Last Modified:

Finding Data Source Name

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
  • 2
1 Solution
Hi Subbaiah,
The DSN on a machine can be found in the registry:
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.
subbaiahAuthor Commented:
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

Hi Subbaiah,
take a look at:
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!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

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.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now