I am writing a Scheduling application, and each row in my Database Table is a different task to run at a certain time. In my application, I pull this information, and store each task in a separate object, and keep them stored in a List.
As of right now, when I run my function to refresh this, there are no checks and it just adds them all again. I need to figure out the best way to see if an object already exists for the particular job, and only create a new Object for it if it doesn't.
Would the best way to do this be to check the ID of the row, and then search through each current task Object to see if it exists? My main concern is I do not know if the Auto Increment ID values replace missing ones. As in, if I have row's with ID 1,2,3,4,5 and at some point the row with ID 3 is removed, will the next row added be 3, or will it be 6?