Re: WebServices and Datasets
- From: "Keenan Newton" <kameleon_dj@xxxxxxxxx>
- Date: 26 Apr 2005 13:46:49 -0700
"So you think that passing a diffgram dataset to a webservice would be
fine?
And if I call the GetChanges Method on the dataset that only the
changes will
be shown in the dataset and to pass that to the web service, correct? I
probably don't need to use a diffgram dataset, just a basic one will be
fine. "
well ther GetChanges method creates a new dataset object with only rows
and atbels with changed data.
"Now to make sure the remote database is updated with changes should I
just create another webmethod that checks the database for
inserts/updates
and relays a message back to the rich client app? If so I would suppose
their
would be a way to create a custom event to fire when database has been
updated. Should I write a separate method for this custom event to
monitor
the webmethod doing the ins/up's for completion? What design do you
think I
should use here? "
Thats a good question, this depends on the requirements of your
application such as location, number of users, service level
agreements, etc... As for the custom event to fire you will need to
poll the database, supposedly with Sql 2005 there wiull be an easier
mechanism to use to determine a change, but remember a web service is
not really a part of an application. A web service can not notify a
client a change as occurred unless the client is constantly polling it.
Same way a web application can't tell a web browser a change as
occured, the web browser must keep polling for the change. I suggest
if you are looking to determine if any updates were made to the data.
That you use a dattime stamp on the rows of data in your tables. Wehn
you make your first query get a datetime stamp from the databse server
(unless you know for sure that all the server clocks are synced up).
Pull that dattime satmp down to the client, now when you make
anyupds/ins, or just want to see if data has been refreshed. Send the
datetime stamp up with the webservice call. ON the database, pull any
records that have a datetime stamp greater then the one sent up from
the client. Then pull just those records back and merge them with your
dataset (DataSet.Merge()). If anyone has a better way using web
services, please chime in.
.
- Follow-Ups:
- Re: WebServices and Datasets
- From: jjardine
- Re: WebServices and Datasets
- References:
- WebServices and Datasets
- From: JJ
- Re: WebServices and Datasets
- From: Keenan Newton
- Re: WebServices and Datasets
- From: JJ
- WebServices and Datasets
- Prev by Date: SOAP Exception
- Next by Date: Re: WebServices and Datasets
- Previous by thread: Re: WebServices and Datasets
- Next by thread: Re: WebServices and Datasets
- Index(es):
Relevant Pages
|