Random System.IndexOutOfRangeException occurred RRS feed

  • Question

  • This error keeps creeping up on me - the system runs many times with the same data and then crashes here.

    I am reading data from a SQL Server Stored proc - the datatype there is BigInt and the datatype in vb.net is Int64.

    The value that is tripping up the system is NOT out of range... can anyone help?

    Am using VS 2010 and 2008 R2

    Error Message Detail

           at System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName)
           at System.Data.SqlClient.SqlDataReader.GetOrdinal(String name)
           at System.Data.SqlClient.SqlDataReader.get_Item(String name)
           at OrthOrg4.frmMDI.GetPatInfo(Boolean fAutocall) in C:\Users\Dr#Martin\Documents\Visual Studio 2010\Projects\OrthOrg4\frmMDI.vb:line 524

    • Edited by martfine Sunday, March 11, 2012 6:54 AM
    Sunday, March 11, 2012 6:44 AM


  • That is because, there is no column named "BinaryCheckSum" for the item being read (You can see that from exception stack trace where get_Item has failed).

    Please mark this post as answer if it solved your problem. Happy Programming!

    • Proposed as answer by Mike Feng Monday, March 12, 2012 7:14 AM
    • Marked as answer by Mike Feng Tuesday, March 20, 2012 9:19 AM
    Monday, March 12, 2012 6:25 AM