We're not big AS/400 experts but we are currently working on a .NET application that needs to access AS/400 for real-time We've been getting some varied results (on queries) over the past two weeks and can't figure out why. Our first request (SPROC on AS/400), it usually takes about 15 seconds to get the data. But after that first call, it takes 1 second to return. And the funny thing is that if the stored procedure is executed directly (using iSeries Navigator), it's almost always quicker.
Anyone have an idea on what's happening? Here's the code that we're using:
Dim Conn As New IBM.Data.DB2.iSeries.iDB2Connection(ConnectionString)
Dim Cmd As New IBM.Data.DB2.iSeries.iDB2Command("SPROC_NAME_HERE", Conn)
Cmd.CommandType = CommandType.StoredProcedure
Dim Reader = Cmd.ExecuteReader()