Need to Renumber an Attribute
So I have a program that uses a DB to store information about various A/V equipment on campus. Each record houses the name, model, location, etc about the item, as well as an arbitrary ID number. The ID number is used by the program to allow it to step through each record, and populate things like combo-boxes and a display that allows me to input data for each item in the database. All of this works lovely. The problem arises when I use the program to delete a record, and the ID numbers are no longer 0,1,2, ... n. Say I delete whichever record is number 2. Then I'm stuck with 0, 1, 3, etc; I can't have numbers being skipped, so this breaks my implementations.
To me at least, the easy fix is to renumber the ID after a record is removed, so that once again I have a situation where it is 0,1,2, ... n with no numbers being skipped. The problem I'm facing is how that is accomplished in Java. I was under the impression that I could run a query, get a result set, make my change to the result set, and then update the result set so that it would change the source too. Nothing that I've tried, however, works. I either get null pointers or error in row. I did have minor success one time, where it renumbered every ID to the same thing. Unfortunately I can't remember what I did, because I could have tweaked that to make it work. Anyone have any thoughts, or could possibly point out a different approach? This is using an Access database, by the way.