Link to home
Start Free TrialLog in
Avatar of jamestieman
jamestieman

asked on

ODBC iSeries DSN ODBCConnection Login Format

I have a VB.NET application that uses the ODBCConnection object to connect to a DSN that is defined using the iSeries Access ODBC driver.  Right now, I can connect  using the DSN name "AS400", like this: dsn=AS400 as the connection string.  
The problem is... my application doesn't Prompt for a user login to the ODBC connection.  Is there a way to add a default user and password to the connection OR a way to bring up a prompt for it the first time a connection is requested?
Avatar of dqmq
dqmq
Flag of United States of America image

Avatar of jamestieman
jamestieman

ASKER

Is creating a DSN optional?  When I look at the ODBCConnection Class, the ConnectionString can be like:

conn.ConnectionString = "Driver={iSeries Access ODBC Driver};System=my_system_name;Uid=myUsername;Pwd=myPassword;

What would be the System Name?

OR, if a DSN is created:

conn.ConnectionString ="DSN=AS400;UID=myUsername;PWD=myPassword;"

Should I use one over the other?

ASKER CERTIFIED SOLUTION
Avatar of dqmq
dqmq
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial