|
-
May 21st, 2008, 09:05 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] [2008] How to refresh my datagrid
ELow guys need help upon refreshing my datagrid every 10 Second...How can I do it guys?
-
May 21st, 2008, 09:36 PM
#2
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|