Slow performance from .NET to AS/400

56,510 pts.
Tags:
.NET
AS/400
iSeries Navigator
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

  Using Conn
   Conn.Open()

   Dim Reader = Cmd.ExecuteReader()
   Using Reader
    While Reader.Read()

               'Do Something

    End While
    Reader.Close()
   End Using

   Conn.Close()
  End Using
Thank you!
ASKED: December 30, 2013  3:29 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following