No, this is for a client app and wouldn't work out well.
It's not that the table is huge but that the connection is very slow.
And I want to minimize network traffic.
> and wouldn't work out well.
Which; SqlDependency? I agree... minimising the data you need at the
client, however, seems pretty OK ;-p
> And I want to minimize network traffic.
So why drag an entire table over? Keep the data at the server, and
just hold conversations with it - either to the database server
itself, or a web-service.
If you really must do it your way, then a delete trigger that pumps
into a "deleted" table may be of use - you can use the identity in the
table to get just the updates you haven't seen, and can purge any
values older than your supported range - perhaps half an hour. Then in
the same way that you query for updates/inserts, just query for
deletes too.
Marc
wackyphill@yahoo.com - 05 Oct 2007 19:33 GMT
> Which; SqlDependency?
Yeah.
> > And I want to minimize network traffic.
>
> So why drag an entire table over? Keep the data at the server, and
> just hold conversations with it - either to the database server
> itself, or a web-service.
Well to keep the UI responsive my thought was to simply load the table
up front when the app starts. Then maybe save the table to disk when
it exits. Then the next time it starts, load from the saved file and
only pull down any changes from the DB which would likely be much
smaller than the whole table we had to download the first time.
> If you really must do it your way, then a delete trigger that pumps
> into a "deleted" table may be of use - you can use the identity in the
> table to get just the updates you haven't seen, and can purge any
> values older than your supported range - perhaps half an hour. Then in
> the same way that you query for updates/inserts, just query for
> deletes too.
Yeah thats an interesting idea.
It's not like I wouldn't rather query the DB everytime I needed
something. It would be easier I agree. Its just that the process is
very time consuming given the UI and the bandwidth available. So I was
just investigating other ideas. We're talking about maybe 4 tables w/
aprox 500 records in each. Not a massive DB. I felt caching it on the
client given their distance from the DB (over a WAN) might make sense.