Error in Array Index

This forum is for eXpress++ general support.
Post Reply
Message
Author
omni
Posts: 554
Joined: Thu Jan 28, 2010 9:34 am

Error in Array Index

#1 Post by omni »

Roger,

All our a/r clear open invoice program uses arrays.

Occasionally users get this error.

oError:description : Error in array index
oError:filename :
oError:genCode : 4
oError:operation : <A of 57>[<58>]

The only thing different is the number, which is always 1 more, so apparently the array counter is off, but have never been able to repeat it. We tell the user to reindex the file, or reboot, and they eventually get it to work. All users utilize this daily, and this comes up just occasionally. Normally on larger numbers, never on very small batches.

If record is selected, it checks to see if already selected and deletes it (that is their instructions on ones selected in error)
Sample:
ADel(aRecords[1],nFound)
ASize(aRecords[1],Len(aRecords[1])-1)

If selected and new.
AAdd(aRecords[1],Receive->pronumbr)

They then edit the transaction and save or cancel.

if they cancel

ADel(aRecords[9],nFound)
ASize(aRecords[1],Len(aRecords[1])-1)

if they accept nothing else is updated.

Do not think anything is wrong with that and have not ever been able to get the counter of the array to be off.

Any thoughts or suggestions?

Fred
Omni

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Error in Array Index

#2 Post by rdonnay »

I would need to see more code than you are showing.

It appears that you may be adding or deleting array elements in a for..next loop or a do..while loop.
The eXpress train is coming - and it has more cars.

omni
Posts: 554
Joined: Thu Jan 28, 2010 9:34 am

Re: Error in Array Index

#3 Post by omni »

Ok, here is that function which is the only function that updates that array.

Uploaded the file but do not see it(?) Tried 4 times, said it uploaded. Arecords.prg was file name.

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Error in Array Index

#4 Post by rdonnay »

You can't upload a file with a PRG extension. It's a security risk. Put it in a ZIP or rename the extension.
The eXpress train is coming - and it has more cars.

Post Reply