J
Jon Brunson
1. Is it possible to setup at SqlDataAdapter to only .Fill() a DataTable
with the rows that have changed? ie, if I have a table with 10,000
records in it, and I change 1 of them, can .Fill() only change that 1
row (nice & quick), rather than re-populate all 10,00 rows (which would
take some time)
2. After loading a DataTable using SqlDataAdapter.Fill(), is it possible
to do this:
a) Save that table to Xml (Load it into a DataSet, then
DataSet.WriteXml()).
b) Load it back again (DataSet.ReadXml())
c) Use another SqlDataAdapter to .Fill() the table properly, knowing
that the rows that already exist in the DataTable came from the
database, and should be updated/deleted if the database has made such
changes to them.
Currently I can only seem to make the SqlDataAdapter.Fill() method add
all the rows again (eg. if the table has 5 rows, after loading from Xml
and .Fill()ing, it contains 10). It's as if the SqlDataAdapter doesn't
know which Xml row matches each row in the database.
with the rows that have changed? ie, if I have a table with 10,000
records in it, and I change 1 of them, can .Fill() only change that 1
row (nice & quick), rather than re-populate all 10,00 rows (which would
take some time)
2. After loading a DataTable using SqlDataAdapter.Fill(), is it possible
to do this:
a) Save that table to Xml (Load it into a DataSet, then
DataSet.WriteXml()).
b) Load it back again (DataSet.ReadXml())
c) Use another SqlDataAdapter to .Fill() the table properly, knowing
that the rows that already exist in the DataTable came from the
database, and should be updated/deleted if the database has made such
changes to them.
Currently I can only seem to make the SqlDataAdapter.Fill() method add
all the rows again (eg. if the table has 5 rows, after loading from Xml
and .Fill()ing, it contains 10). It's as if the SqlDataAdapter doesn't
know which Xml row matches each row in the database.