Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7042641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:11:35+00:00 2026-05-28T02:11:35+00:00

I am writing a Scheduling application, and each row in my Database Table is

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:11:35+00:00Added an answer on May 28, 2026 at 2:11 am

    You could store the objects in a Dictionary where Key is int and Value is the type of your object (e.g. Task). You could then pull the task out from the Dictionary using the key:

    Dictionary<int, Task> dict = new Dictionary<int, Task>();
    
    // Code to do first-time initialise of the dictionary
    ....
    
    // Subsequent refresh
    Task task;
    if (!dict.TryGet(id, out task))
    {
        task = new Task();
        task.Id = id;
        ...
        dict.Add(id, task);
    }
    

    As for the auto incrementing of ids, it is likely that the RDBMS sets the value for the new rows as last value assigned + 1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing up a scheduling application for my wife, and I ran into the
I'm in the process of writing a scheduling application on a shared hosting server.
I'm writing a scheduling application in Java using Quartz. I'm using the CronTrigger, but
I am writing an application to allow users to schedule one-time long-running tasks from
Im writting a Spring Application, which has to run a task in a new
I'm writing a scheduling application that uses JQuery UI extensively. One of the requirements
I am writing a scheduling program for my company and I wanted to pull
Writing something like this using the loki library , typedef Functor<void> BitButtonPushHandler; throws a
Writing my first Linq application, and I'm trying to find the best way to
Writing a python program, and I came up with this error while using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.