Solved

reading values of dsn

Posted on 2002-04-19
1
132 Views
Last Modified: 2010-05-02
I have a system dsn called "spw" that connects to sqlserver 7.0, how can I read WHICH SQL server it is using?

thanks
Sopheak
0
Comment
Question by:sopheak
1 Comment
 
LVL 3

Accepted Solution

by:
DrMaltz earned 25 total points
ID: 6954492
sopheak,

system dsn are stored in the registry.. in a particular folder..

HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\<nameofDSN>

Once you find your dsn in the registry, you'll notice a key called SERVER.  That contains your value..

Check out the following article which discusses reading info from the registry..

http://www.vb-world.net/registry/registry2/

Good Luck,

DrMaltz
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

830 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