I am trying to connect to an IBM AS/400 Database. I have created a system DSN called "SR". I am using the following code:

VB Code:
  1. Dim cnItemConn As New Odbc.OdbcConnection
  2. Dim daItemAdapter As New Odbc.OdbcDataAdapter
  3. Dim dsItemSet As New DataSet
  4. Dim cmdselect As New Odbc.OdbcCommand
  5. Dim sCmd As String
  6.  
  7. cnItemConn.ConnectionString = "DSN=SR;uid=xxxx;pwd=yyyyy;Driver={Client Access ODBC Driver (32-bit)}"
  8.  
  9. dsItemSet.Tables.Add("Items")
  10.  
  11. sCmd = "SELECT IASA.ITNBR, IBL.MOHTQ, IASA.WHSLC, IASA.ITDSC FROM AMFLIBX.ITEMBL AS IBL LEFT OUTER JOIN AMFLIBX.ITEMASA AS IASA ON IBL.ITNBR=IASA.ITNBR WHERE IASA.ITNBR ='90503'"
  12.  
  13. cmdselect.Connection = cnItemConn
  14. cmdselect.CommandText = sCmd
  15.  
  16. daItemAdapter.SelectCommand = cmdselect
  17.  
  18. daItemAdapter.Fill(dsItemSet.Tables("Items"))

When I run this code in an ASP.NET Web App I get an error, "Data Source Name not found and no default driver specified." The exact same code in a VB.NET Windows application, running on the same PC hosting the Web App, works fine. Any ideas?