Sync dataset once its been sent to the dataset
am 07.12.2007 05:32:09 von Gabe Garza
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
Re: Sync dataset once its been sent to the dataset
am 07.12.2007 06:24:26 von notmyfirstname
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
Re: Sync dataset once its been sent to the dataset
am 07.12.2007 07:50:01 von Gabe Garza
"Cor Ligthert[MVP]" wrote in message
news:A3148591-F88F-40E4-928D-986FB711C315@microsoft.com...
> 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