Unanswered: How to tell RDBMS opened by ODBC connection?
I have a form defined in which I prompt the user to select an ODBC data source using code similar to the following:
Dim wrkODBC As Workspace
Dim conPubs As Connection
' Create ODBCDirect Workspace object.
Set wrkODBC = CreateWorkspace("NewODBCWorkspace", "admin", "", dbUseODBC)
Set conPubs = wrkODBC.OpenConnection("DBConnection", dbDriverPrompt, True, "ODBC;DSN=;UID=;PWD=")
What I need help with is figuring out which RDBMS the driver belongs to (I.e. is it for oracle, db2, etc?). The RDBMS version is not as much an issue for me but would be nice if I could get that as well. Has anyone run into this or seen information on this topic that might guide me in the right direction?
you will see the connection string, and within this will be 'Driver=Microsoft Access Driver (*.mdb);' or similar.
Is that what you wanted to know ?
Although this information is available by examining the DSN selected from the Data Source prompt box when you run the code (dbDriverPrompt).
The DSN is set in the Control Panel =>32bit OBDC option etc (or Control Panel => Administerative Tools => DataSources, if using XP it my be different in win 2K but I can't remenber - something to to with age!).
Mike, thx for the reply. I have already looked into (and am using) that property but for Oracle, DB2, etc. it doesn't provide me with the information I need.
After searching the web all day I think what I need to use is the SQLGetInfo function of the ODBC API. The problem is I cannot find sample code on this anywhere. Will continue to search and post results if I ever find anything!