Results 1 to 7 of 7

Thread: Index was outside the bounds of the array.

  1. #1
    Join Date
    Dec 2002
    Location
    Albany, NY
    Posts
    115

    Index was outside the bounds of the array.

    Frank,

    I can't seem to get by this error. Can you give any direction as to how to approach debugging this?

    it seems like .NET generates this, and it occurs once I press the add or update button in Tornado so normal Tornado debug can't reply.

    Index was outside the bounds of the array.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.IndexOutOfRangeException: Index was outside the bounds of the array.

    Source Error:


    Line 283: ' ************************************************** *****************
    Line 284:
    Line 285: .aspDBNet(Condition)
    Line 286:
    Line 287: if (lstClick="gridadd") then


    Source File: E:\NYExtranet\Tornado\scratch\StipMPO_AddEdit_Phas e.aspx Line: 285

    Stack Trace:


    [IndexOutOfRangeException: Index was outside the bounds of the array.]
    Tornado.RS_OleDB.GetRS_CR(String dsn, String sql, String act) +13065
    Tornado.RS.GetRS_CR(String act) +928
    Tornado.z.ASPdbNET(String MainOpt) +1240
    ASP.StipMPO_AddEdit_Phase_aspx.Page_Load(Object Source, EventArgs E) in E:\NYExtranet\Tornado\scratch\StipMPO_AddEdit_Phas e.aspx:285
    System.Web.UI.Control.OnLoad(EventArgs e) +67
    System.Web.UI.Control.LoadRecursive() +35
    System.Web.UI.Page.ProcessRequestMain() +731

    thanks in advance, Paul


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

  2. #2
    Join Date
    Oct 2002
    Posts
    933
    Give me some code to produce the error. Out of bound array index usually is caused by mis-matched fields in various display and editing activities.

    FK

  3. #3
    Join Date
    Dec 2002
    Location
    Albany, NY
    Posts
    115
    Thanks for the heads up on this error. I'll look over the fields display, edit, add etc., and send you my code as an attachment to an email. it's rather long...

    Also, do you think Tornado needs a .dbeditGridUpdateSQL and .dbeditGridAddSQL to go along with the new functions (.dbeditGridAddflds and .dbeditGridUpdateflds)?

  4. #4
    Join Date
    Oct 2002
    Posts
    933
    there is editupdate and Add SQL already. You mean the "Grid" edit setup needs it's own set of SQL? It is kind of deep but possible.

    Frank

  5. #5
    Join Date
    Dec 2002
    Location
    Albany, NY
    Posts
    115
    I think it makes sense. This way the developer can specify the exact SQL statment for the new functions. It takes the guess work out of the picture..

    Getting back to the
    "Index was outside the bounds of the array" error I can't get around.

    I have narrowed the issue down to the SQL statement. So, I created a test program to simply add a record to 2 tables. The SQL statement works in MS SQL Server, "Query Analizer" but not in the .aspx file. What's with this? It's a very simple SQL statement:

    Select * FROM mpoProject,ProjectLocation

    What do you think?

  6. #6
    Join Date
    Oct 2002
    Posts
    933
    I'll look at your attached code

    FK

  7. #7
    Join Date
    Oct 2002
    Posts
    933
    The Grid Edit SQLs seems resonable. I'll get to that middle of next week.


    FK

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •