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

  • SEARCH
  • Home
  • 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 3953870
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:01:40+00:00 2026-05-20T02:01:40+00:00

I have 2 applications, one an ASP.NET site the user interfaces with, and then

  • 0

I have 2 applications, one an ASP.NET site the user interfaces with, and then a second C# application that schedules jobs for execution. I’m having trouble with change tracking in the C# application, so that it can respond to updates to the database from the user. The basic idea is this:

The user adds a new row to the Products database via the ASP.NET website. The C# application should then be notified of the new row, and it will spawn a Quartz.NET job to do something with this newly created product. If the product details are updated, the C# application is notified and updates the Quartz.NET job appropriately.

Pseudocode:

while(true) // it's not really a loop like this, but this suffices
{
    var newProducts = from p in dc.Products where Added_On > DateTime.Now;

    foreach(Product product in newProducts)
        CreateNewJob(product);
}

Then, each job is required for tracking changes to it’s individual column:

void Execute(...)
{
    var product = from p in dc.Products where Id == this._product.Id;

   if (CompareProduct(this._product, product) == false)
       _product = product;

   // do work with the product
}

or with a timestamp:

void Execute(...)
{
    var updated = from p in dc.Products where Id == _product.Id && Updated_On > DateTime.Now;

     if (updated != null)
         _product = updated;
}

Since more often than not, the product’s won’t be changing, is there a better solution than to query for changes every time it executes?

The requirement is that if the data has changed, the Quartz.NET job should not execute with stale data. At the beginning of Execute() it should be the most recent changes. It is OK if the state changes during execution though.

I’ve looked at SqlDependency, but everything I’ve read says it does not tell you what changed, only that something changed. It seems infeasible for a large database to constantly pull down the full table, and do the comparison myself.

Change tracking also seems that it might be inefficient. I’d have to pull down all the changes, find the Quartz.NET job corresponding to the changed item, and update it with the most recent data.

  • 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-20T02:01:41+00:00Added an answer on May 20, 2026 at 2:01 am

    Probably the best way is to do this the old-fashoined way — use the sql TIMESTAMP column to do the change tracking yourself. Then your scheduler only need grab rows where TIMESTAMP is > [last runned TIMESTAMP] to schedule. When scheduled, it can check the row to see if the TIMESTAMP has changed and grab the new data before running.

    Now, if you’ve got multiple tables to worry about, this gets to be a bit more complex.

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

Sidebar

Related Questions

I have an ASP.NET MVC application that has one part where I dont really
I have an ASP.NET 3.0 application that works fine on one server. It uses
I have two ASP.NET MVC web applications. One of them logs unhandled exceptions to
I have started upgrading one of our internal software applications, written in ASP.NET Web
I have one asp.net web application. It is using two membership provider. Two sign-in
I'm doing an asp.net application with one page. In this page, I have one
I have one question; In my ASP.NET MVC web application have to do certain
I have an ASP.NET application. Basically the delivery process is this one : Nant
I have an ASP.NET application I am working on. One of the requirements of
I have an ASP.NET webforms application with a Menu control. How does one hide

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.