I put the connection sting in my web.config file like this...
<appSettings>
<add key="AS400" value="Provider=IBMDA400.DataSource.1;Password=password;Persist Security Info=True;User ID=UserName;Data Source=dsName;Protection Level=None;Transport Product=Client Access;SSL=DEFAULT;Force Translate=65535;Default Collection=UserName;Convert Date Time To Char=TRUE;Catalog Library List=defaultLibrary"/>
</appSettings>
then call the data set like this
Private Sub AccountList()
Dim strSQL As String
strSQL = "sql statement"
Dim dr As OleDbDataReader
dr = GetDataReader(strSQL)
cmbAccounts.Items.Clear()
While dr.Read()
Dim Acct As New ListItem()
Acct.Text = Left(dr.GetString(0), 3) & "-" & Mid(dr.GetString(0), 4, 3) & "-" & Mid(dr.GetString(0), 7, 1)
Acct.Value = dr.GetString(0)
cmbAccounts.Items.Add(Acct)
cmbAccounts.SelectedIndex = 0
End While
dr.Close()
End Sub
GetDataReader looks like
Private Function GetDataReader(ByVal sqlText As String) As OleDbDataReader
Dim dr As OleDbDataReader
Dim cnn400ole As OleDbConnection = New OleDbConnection(ConfigurationSettings.AppSettings("AS4001"

)
Dim oleCmd As OleDbCommand = New OleDbCommand(sqlText, cnn400ole)
oleCmd.Connection.Open()
dr = oleCmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
Return dr
End Function