Results 1 to 11 of 11

Thread: [RESOLVED] Dynamically Obtaining ODBC Data Source Name

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Omaha, NE
    Posts
    270

    [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:
    1. Set db = New Connection
    2.     db.CursorLocation = adUseClient
    3.     db.Open "PROVIDER=MSDASQL;dsn=[b]AS400-01[/b];uid=" & strUserID & ";pwd=" & _
    4.         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
    Last edited by NateBrei; Jul 15th, 2002 at 10:22 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width