[RESOLVED] Dynamically Obtaining ODBC Data Source Name
I have a database application that works great on my machine. It uses an ODBC Sytem DSN to connect to an AS/400 system. My system uses a specific name (let's call it 'AS400-01') to access the data. My application will be deployed to others in my organization all of whom will have access to the same AS/400 system. However, their System DSN may (most likely) be named differently (ie. 'MyAS400').
Here is my connection statements for this connection.
VB Code:
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=MSDASQL;dsn=[b]AS400-01[/b];uid=" & strUserID & ";pwd=" & _
strPassword & ";"
Is there anyway I can dynamically get the user's dsn based on the AS400 system name to which the dsn points? (I hope this makes some sense.....)
Thanks in advance for any help.
Nate