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 6828487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:23:20+00:00 2026-05-26T22:23:20+00:00

I have an SQL database, which is a feeder table. I put records in

  • 0

I have an SQL database, which is a “feeder” table. I put records in said table, a 3rd party package consumes (and deletes) them. All hunky dory – until the 3rd party package isn’t running. In thinking about how to detect that, I thought to myself… “well… what if I read all the keys in the table (its not very big – max a few dozen records), and kept them, and then in, say, 5 minutes, I checked if any were still in the table ?”

It may not be a brilliant solution, but it sent me off thinking about Linq and whether you could do such a thing (I haven’t used Linq before).

So, if I read all the record keys into a DataTable object and then, five minutes later, read all the records into another DataTable object, I can do a Linq select, joining the two DataTable objects on the key column, and then look at the results of “Count”, and if one or more, chances are the data in the table isn’t being consumed.

Or… is there a “cleverer” way than that ?

  • 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-26T22:23:20+00:00Added an answer on May 26, 2026 at 10:23 pm

    But this is more what I had in mind:

    DataTable t1 = GetData(); // returns a datatable with an Int16 "Id" column
    // time passes... your lamp is getting dim
    DataTable t2 = GetData();
    
    // some data changes have occurred
    t2.Rows.Add(null, DateTime.Now.AddSeconds(10), "Some more");
    t2.Rows[1].Delete();
    
    EnumerableRowCollection<DataRow> rows1 = t1.AsEnumerable();
    EnumerableRowCollection<DataRow> rows2 = t2.AsEnumerable();
    
    // how many rows from r1 are still in r2
    int n = (from r1 in rows1
            join r2 in rows2 on (Int16)r1["Id"] equals (Int16)r2["Id"]
            select r1).Count();
    

    …which is the “linq/join” method I alluded to in the original question.

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

Sidebar

Related Questions

I have a DataGridView which is filling from Table in SQL Server Database. One
I have a SQL Server database with an Apartment table (which has columns FloorNum
Learning php! I have a sql database which contains a table called 'images' which
I have a sql server 2005 database which contains a user table.. Is it
I have a table in a SQL Server database which I want to add
I have a table in a SQL 2005 database which is brand new. As
I have a SQL Server 2005 legacy database which has a table named user
I have got SQL Server database in which Table column name have spaces. For
I have a SQL database table column which has data in this format 0000-00-0000
I have a Sql Database (which I have no control over the schema) that

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.