how to update db after being disconnected for 10 minutes?

J

Jason Shohet

I have an asp.net app, and suddenly, I lose connection to the web server.
I'd like a way -- if the update doesn't go thru, to 'cache' the changes to
the dataset.
Then the next time the user hits update, and the connection is restored, it
updates the db.

This applies for a WindowsCE device where the user is moving around, and may
not be able to connect for a few minutes at a time, but he/she is still
making changes to the app. I don't need for them to be able to retrieve
from the db, its enough that they can do updates, deletes etc on a
recordset stored on the device somewhere, and then when it connects again to
the web server, it does the updates / deletes etc.

Is this a dream or is there actually some way to do this.
I've been asking on the mobile newsgroup but not that much available there.
TY --- Jason Shohet
 
D

Dilip Krishnan

Jason said:
I have an asp.net app, and suddenly, I lose connection to the web server.
I'd like a way -- if the update doesn't go thru, to 'cache' the changes to
the dataset.
Then the next time the user hits update, and the connection is restored, it
updates the db.

This applies for a WindowsCE device where the user is moving around, and may
not be able to connect for a few minutes at a time, but he/she is still
making changes to the app. I don't need for them to be able to retrieve
from the db, its enough that they can do updates, deletes etc on a
recordset stored on the device somewhere, and then when it connects again to
the web server, it does the updates / deletes etc.

Is this a dream or is there actually some way to do this.
I've been asking on the mobile newsgroup but not that much available there.
TY --- Jason Shohet
Jason,
Theres defenitely differnet ways to do this based on the effort. In
principle what you need is some kind of a proxy that caches every data
element which is headed to the server. And that involves development.
Usually IMHO the best way to go about it is to develop a WS on the
server side and talk to it through a Winforms client, for these kind of
solutions.
 
G

Guest

One word answer, Datasets.
Study dataset, because that's the exact purpose of them..
Reza
 
J

Jason Shohet

Thanks.
Yes that was my thinking too, versus writing to some local "oracle lite' or
'sql ce' database if I can't connect. And then have to bridge / synch that
data back up to our main Oracle 9i database later -- yuck.

The one thing I don't get is how to keep the dataset around as the user is
hitting save etc, which calls postbacks. If the browser becomes
disconnected from the web, where is the dataset going to go between
postbacks? I can't put it in a session because that goes on the web
server -- and there is no web server if I'm disconnected. Any ideas on
that?
 
J

Jason Shohet

Hi Dilip,

See my reply to Rezas. I know how to hit a WS (web service) from a windows
app but only if it can find it. If my windowsCE device is not connected to
the web, how can i find the web service -- via a windowsforms app or a
asp.net app :)

And by the way, I'm not worried at all about concurrency. There's no
possibility others will be writing to the same records as I am. So my
thinking is to somehow deal with a disconnected dataset. I just don't know
how to keep that dataset around as the user is making changes to the
records, between postbacks -- since i can't put it in a session. If I can
somehow keep it around, then I can use that dataset commandBuilder (which
I've never used but sounds interesting), to say "Hey Oracle, I've got this
dataset thats been sitting around here for 10 minutes, disconnected from
you. Reconcile this dataset with the main database, making any changes
necessary to the main db!"
 
D

dm_dal

Idunno much about CE, but is it possible for you to use serialization?
Serialize the DataSet to an xml file and store it locally, then, when your
connection comes back up, check for any serialized datasets you have stored,
de-serialize it/them and send them back to the server/gateway.

Of course, i'm assuming that the device has RAMFS capabilities.

David Young
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top