Sync dataset once its been sent to the dataset

J

John Sheppard

Hello there,

How do people normally sync datasets between client and webservice? For
example;

I send a dataset to the webservices with updated rows on it, the webservice
execute the sql to persist it to the database and updates the dataset so
that haschanges=false and with the correct Ids in it, I now have an updated
dataset on the webservice, do I just pass that back to the client and merge
it?

Will I get the correct autonumbers and stuff when I do that? Whats the best
way to do it? :(

Thank you for any assistance
Kind Regards
John Sheppard
 
C

Cor Ligthert[MVP]

John,

You will never know what other users have done to your database, you cannot
select that, therefore I will always refresh my data completely (and
therefore never use a complete datatable however use always "where" clauses
to select as fine the data I need).

(And don't use the identity column for anything else then to make a row
unique)

Cor
 
J

John Sheppard

Cor Ligthert said:
John,

You will never know what other users have done to your database, you
cannot select that, therefore I will always refresh my data completely
(and therefore never use a complete datatable however use always "where"
clauses to select as fine the data I need).

(And don't use the identity column for anything else then to make a row
unique)

Cor

So when ever you run an update query you follow it with a complete new load
as you would normally? Ic..that makes sense..

How do deal with records that have not been persisted or some form of error
has occured? What if say some records saved and some didnt? Do you wrap
everything in transactions?

Thanks Cor
 

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

Top