Results 1 to 2 of 2

Thread: [RESOLVED] [2008] How to refresh my datagrid

  1. #1

    Thread Starter
    Hyperactive Member shyguyjeff's Avatar
    Join Date
    Jul 2007
    Location
    City of Durian
    Posts
    289

    Resolved [RESOLVED] [2008] How to refresh my datagrid

    ELow guys need help upon refreshing my datagrid every 10 Second...How can I do it guys?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2008] How to refresh my datagrid

    There's no magic. If you need new data every 10 seconds then you need to query the database every 10 seconds. Within that you have two choices:

    1. Get all the data every time. This is easier but less efficient.

    2. Get only the data that has changed since the last refresh. This is more efficient but requires that you change your database schema.

    If you choose the first option then the amount of data being retrieved from the database will tend to be large. With large numbers of records and multiple users the application may become all but unusable as a result.

    If you choose the second option then you need some way to identify what data has changed since the last retrieval. To do that you'd need a column that contains the time of the last modification. You can then query the database for only records where that value is later than the latest value you currently have. Any time you add or update a record you would need to set that field using your database's function for getting the current date and time.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width