Not an easy task, but to get a reliable list, you would need to scan the network looking for computers listening on TCP port 1433 - these would be SQL servers (and perhaps MSDE). If you have admin authority, I believe you can open the Master database in the SQL server, to get a list of databases hosted. Scan all hard drives of all machines for *.mdb (Access databases).
This would cover most Windows-based databases. If you care about others, such as Oracle, MySQL, DB2 etc, you have a much tougher problem.
Looking for DSN's is not sufficient. Many peple use DSN-Less connections, so a DNS is not a reliable indicator of the existance or abasence of a database. | [reply] |
There might be a better way, but you can query the registry for the DSN information,
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\odbc.ini\DSNName
Mitch | [reply] |