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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:21:38+00:00 2026-05-13T14:21:38+00:00

I have a database with a table that records data coming from various sources.

  • 0

I have a database with a table that records data coming from various sources.
3 columns

‘Source’ ‘Value’ ‘Timestamp’

e.g.

source1 21 ’11:03′

source6 22 ’11:03′

source9 456 ’11:03′

The table is updated 2 to 3 times a second.
Each Value may or may not change.
Each ‘Source’ value is displayed in a seperate label or text box on the screen (not in a grid).
I need to find the best method to get this data to bind to WPF contols.
What type of object should I hold the data in Dictionary, DataTable etc.

What type of object is going to hold the data?
How do I bind my Label or TextBox to the value.

I query the sources 2 to 4 times a second.
The vast majority of the time the values in the database table won’t change
Often it is only one value that changes
Sometimes they all change
I only expect to have upto about 30 unique datasources.

Put your thinking caps on please.

  • 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-13T14:21:39+00:00Added an answer on May 13, 2026 at 2:21 pm

    Just by chance I’m working through a very similar problem. Like me, I am assuming that you are updating the data in a background thread.

    Collections

    Use MTObservableCollection instead of ObservableCollection to store the data. A ObservableCollection is normally used for data binding on stuff that can change, but it can’t be updated from a background thread. MTObservableCollection works for me, but it isn’t inheritently thread safe so be careful.

    http://www.julmar.com/blog/mark/2009/04/01/AddingToAnObservableCollectionFromABackgroundThread.aspx

    Models

    Each object should implement INotifyPropertyChanged Interface. This will make them support data binding. Also, WPF allows you to update properties this way on brackground threads.

    http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged.aspx

    Prefer Update over Clear and Add

    Make sure you always update objects when you can. Don’t just clear the collection and reload it, that will be very expensive and cause adverse UI effects. Of course you can do individual adds and removes when needed.

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

Sidebar

Ask A Question

Stats

  • Questions 342k
  • Answers 342k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Upgrade to beta 2 May 14, 2026 at 5:13 am
  • Editorial Team
    Editorial Team added an answer You can find a full listing of all system resources… May 14, 2026 at 5:13 am
  • Editorial Team
    Editorial Team added an answer It's the JIT compiler that instructs the CLR to load… May 14, 2026 at 5:13 am

Related Questions

I have a fairly huge database with a master table with a single column
I have a table Blah with a PK column BlahID and an XML column
Rookie question I know. I have a table with about 10 fields, one of
There have been a couple of questions about limiting login attempts, but none have
I have a table ContentHistory in a SQL Server 2008 database with a column

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.