I have a simple case of two datasets each containing a table with the same
schema. When I merge the two datasets, the empty tables in daataset1 get
filled with the rows from dataset2, all fine so far. When I try and get the
changes of the tables in dataset1 no changes are returned. Any ideas?

''merge the server table with the local table
ds_Server.Merge(ds_Local)
ds_Server.Table(0-x) all have rows now,
but ds_Server.Table(0-x).GetChanges returns nothing.

Re: Merge and Get Changes returns nothing by Cor

Cor
Tue Aug 02 11:56:58 CDT 2005

Joseph,

Because you merge complete rows, not items.

The datarowstates stay the same, it is not a kind of selective merge as you
have maybe the idea about..

It merges all, where the rows with the same key are replaced and the ones
with not a same key in the called table are added to the caller.

I hope this helps,

Cor



Re: Merge and Get Changes returns nothing by Joseph

Joseph
Tue Aug 02 14:11:53 CDT 2005

So what is the cure, do I have to go through each row and change the
rowstate to modified and inserted as appropriate?


"Cor Ligthert [MVP]" <notmyfirstname@planet.nl> wrote in message
news:OqB5dN4lFHA.2080@TK2MSFTNGP14.phx.gbl...
> Joseph,
>
> Because you merge complete rows, not items.
>
> The datarowstates stay the same, it is not a kind of selective merge as
> you have maybe the idea about..
>
> It merges all, where the rows with the same key are replaced and the ones
> with not a same key in the called table are added to the caller.
>
> I hope this helps,
>
> Cor
>



Re: Merge and Get Changes returns nothing by Cor

Cor
Tue Aug 02 14:31:34 CDT 2005

Joseph,

Normally they have a changed rowstate in advance, however why that is not,
is something I cannot see from this message thread. Do you use by instance
somewhere acceptchanges in advance?

Cor



Re: Merge and Get Changes returns nothing by Joseph

Joseph
Wed Aug 03 01:02:24 CDT 2005

No, I get data from a local database (based on a primary key GUID) then I
get data from a server database (based on the same GUID), then I merge the
local dataset to the server dataset, none of the rows that get inserted have
any rowstate other than unmodified.

"Cor Ligthert [MVP]" <notmyfirstname@planet.nl> wrote in message
news:%23oUy2j5lFHA.2656@TK2MSFTNGP14.phx.gbl...
> Joseph,
>
> Normally they have a changed rowstate in advance, however why that is not,
> is something I cannot see from this message thread. Do you use by instance
> somewhere acceptchanges in advance?
>
> Cor
>



Re: Merge and Get Changes returns nothing by Cor

Cor
Wed Aug 03 01:43:59 CDT 2005

Joseph,

> No, I get data from a local database (based on a primary key GUID) then I
> get data from a server database (based on the same GUID), then I merge the
> local dataset to the server dataset, none of the rows that get inserted
> have any rowstate other than unmodified.
>
Than the merged rows have as well a rowchange unmodified. However, this will
probably help you when you use it on the local(I assume this) fill.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatacommondataadapterclassacceptchangesduringfilltopic.asp

I hope this helps,

Cor



Re: Merge and Get Changes returns nothing by Joseph

Joseph
Thu Aug 04 02:51:07 CDT 2005

Excellent, I set AcceptChangesDuringFill to false for the local database and
everything now seems to work fine.

Thanks.

"Cor Ligthert [MVP]" <notmyfirstname@planet.nl> wrote in message
news:u5BLmb$lFHA.2628@tk2msftngp13.phx.gbl...
> Joseph,
>
>> No, I get data from a local database (based on a primary key GUID) then I
>> get data from a server database (based on the same GUID), then I merge
>> the local dataset to the server dataset, none of the rows that get
>> inserted have any rowstate other than unmodified.
>>
> Than the merged rows have as well a rowchange unmodified. However, this
> will probably help you when you use it on the local(I assume this) fill.
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatacommondataadapterclassacceptchangesduringfilltopic.asp
>
> I hope this helps,
>
> Cor
>