General discussion

Locked

How to get server name, Login & if possi

By jaikrishna ·
I want to get the server name , login and password from the DSN that has been created for a particular database. I want read this info and displayed on to a form. Is it possible?? Or any another way to get this info. I am using VB programming for this.

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

How to get server name, Login & if possi

by jeff In reply to How to get server name, L ...

All ODBC DSN properties are stored in the registry keys hkey_local_machine\software\odbc\odbc.ini (for system DSNs) and hkey_current_user\software\odbc\odbc.ini (for User DSNs). File DSNs are stored in the file system and can be read directly from a file; the default DSN location is in hkey\local_machine\software\odbc\odbc.ini\ODBC File DSN\DefaultDSNDir. You can simply use the VB registry functions to get the information you want and display it on your form. Most drivers will not store the password as plain text in the registry, though, so you may not be able to get that. Good luck!

Collapse -

How to get server name, Login & if possi

by jaikrishna In reply to How to get server name, L ...

Could u please provide me the code.

Back to Software Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums