T
TWischmeier
Hi,
I have some trouble updating my database. I have two DataTables: one
"main" table and a second table, which contains a copied subset of the
rows of the main table. Some values of non-PK-columns get changed in
the second table and those values are saved back to the main table via
Table.Merge(). Up to here all seems to work properly, as the affected
rows in the main table all contain the new values and have the
RowStatus "Modified".
I then invoke DataAdapter.Update(Table) with the main table. This call
returns the expected number of rows which were to be updated, but the
values do not get updated in the table (I checked this via
QueryAnalyzer). Subsequently, DataAdapter.Fill(Table) overwrites the
Table with the old values. Also, the DataAdapter.RowUpdated event does
not fire (I hooked up to see if it would).
The DataAdapter is bound to a single table and I use the
SqlCECommandBuilder for retrieving the corresponding Delete / Insert /
Update commands.
Where am I going wrong, what options do I have to narrow the problem
down further? .NETCF version ist 3.5, as is the SqlCE Version. OS is
Windows Mobile 6 Professional on the device emulator.
I have some trouble updating my database. I have two DataTables: one
"main" table and a second table, which contains a copied subset of the
rows of the main table. Some values of non-PK-columns get changed in
the second table and those values are saved back to the main table via
Table.Merge(). Up to here all seems to work properly, as the affected
rows in the main table all contain the new values and have the
RowStatus "Modified".
I then invoke DataAdapter.Update(Table) with the main table. This call
returns the expected number of rows which were to be updated, but the
values do not get updated in the table (I checked this via
QueryAnalyzer). Subsequently, DataAdapter.Fill(Table) overwrites the
Table with the old values. Also, the DataAdapter.RowUpdated event does
not fire (I hooked up to see if it would).
The DataAdapter is bound to a single table and I use the
SqlCECommandBuilder for retrieving the corresponding Delete / Insert /
Update commands.
Where am I going wrong, what options do I have to narrow the problem
down further? .NETCF version ist 3.5, as is the SqlCE Version. OS is
Windows Mobile 6 Professional on the device emulator.