Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2002
    Posts
    72

    Unanswered: Subscript out of range problem

    I have compiled my code without any problems, but when I try to split my database I get the following error 'Subscript out of range'. Any clues as to why I get this error much appreciated.

    Thanks

  2. #2
    Join Date
    Aug 2002
    Location
    Singapore
    Posts
    91

    Re: Subscript out of range problem

    'Subscript out of range' error won't appear when you compile, it is appear on run time. You just need to make sure that all array index is valid. If you can reproduce this error in your splitted database, have you test on your original (backup before it's splitted) using the same sequence/data and find out whether the error also appear on your original database?

  3. #3
    Join Date
    Jun 2002
    Posts
    72
    The error comes up as part of the split process, so I can't split the database.

  4. #4
    Join Date
    Oct 2002
    Location
    Rochester, NY
    Posts
    84
    Originally posted by Spanner
    The error comes up as part of the split process, so I can't split the database.
    I agree with Djoko.

    This problem is with an array in your code. Typically, this will happen with arrays that are zero based (i.e elements are numbered 0,1,2,3,4 when there are 5 elements and you try to use the number 5 to access an element in the array). This can also happen when you dynamically resize the array.

    I would look for where ever you are using arrays, and make sure the index you use to access the elements is consistant with how the size is declared or resized. Good Luck!
    Regards,
    Terry

Posting Permissions

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