Hello,

I have an asp.net app . I load a huge table from database in a datatable
object which is
cached. The source table is modified once an hour. I want my "in memory"
table to reflect these changes without reloading everything.( In fact , only
a few rows are added , substracted to the table).

How do i best update my "in memory" table without reloading the whole source
table. That should be far more efficient then having to pull the entire
table again.

Many thanks
JB

Re: Updating in memory datatable efficiently. by Patrice

Patrice
Tue May 03 09:27:16 CDT 2005

You could have something like an updated date allowing to reload only those
who changed...


Patrice

--

"jensen bredal" <jensen.bredal@yahoo.dk> a écrit dans le message de
news:%23z9FQt%23TFHA.2128@TK2MSFTNGP15.phx.gbl...
>
> Hello,
>
> I have an asp.net app . I load a huge table from database in a datatable
> object which is
> cached. The source table is modified once an hour. I want my "in memory"
> table to reflect these changes without reloading everything.( In fact ,
only
> a few rows are added , substracted to the table).
>
> How do i best update my "in memory" table without reloading the whole
source
> table. That should be far more efficient then having to pull the entire
> table again.
>
> Many thanks
> JB
>
>



Re: Updating in memory datatable efficiently. by jensen

jensen
Tue May 03 09:34:04 CDT 2005

Not sure i understand what you mean.
Thanks
JB



Re: Updating in memory datatable efficiently. by Patrice

Patrice
Tue May 03 10:02:46 CDT 2005

If you have an "updated" DateTime field in your source table you'll be able
:
- to retrieve which records have been updated (and if no records you can
stop here) since the last fetch
- to delete those records from your current datatable
- to insert those updated records in your current datatable

This way it should be possible to keep in sync by just reading from the
source those records who have been updated since the last read...


Patrice
--

"jensen bredal" <jensen.bredal@yahoo.dk> a écrit dans le message de
news:uFJJP1%23TFHA.2556@TK2MSFTNGP12.phx.gbl...
> Not sure i understand what you mean.
> Thanks
> JB
>
>



Re: Updating in memory datatable efficiently. by jensen

jensen
Tue May 03 10:10:48 CDT 2005

> - to retrieve which records have been updated (and if no records you can
> stop here) since the last fetch
> - to delete those records from your current datatable
> - to insert those updated records in your current datatable
>
> This way it should be possible to keep in sync by just reading from the
> source those records who have been updated since the last read...
>
>
> Patrice
>

That was much better!

Many thanks.

JB