Complete ODBC-String with all defined attributes for a specific DSN
Posted on 2000-04-14
I am trying to get an complete ODBC-String with all defined attributes for a specific DSN name I created with the odbc admin tool. My Intention is to establish a connection to an oracle or informix database within ms access by code like this
strDSN = FunctionOrAPICallIamSeekingFor("My_DSN_Name")
Call DBEngine.OpenDatabase("", dbDriverPrompt, False, "ODBC;" & strDSN & ";UID=SuperBrain;PWD=MegaSecret")
Executing this code at applications start up prevents any driver prompt on opening a odbc table because ms access seems to make a internal clone of my (!) established connection for its own further use. For flexibility reasons I only want to store the DSN name instead of all the attributes in the code.
Does anyone know how to get all attributes for a stored DSN preferably with VB?