19.07.2013, 10:40
I had this problem too. Keep in mind that array indexes start from 0, and database indexes start from 1. I had additional field in enumerator called dbID, which held the database id of record. Iterators are really handy if you don't know how much records are loaded. Also remember that you shouldn't waste any memory, so if you skip some key in array, you are wasting enum size*cell bytes of memory.