Andrew,
Thanks for the response.
I tried commenting out the accept changes line and still had no luck.
However, after tons of digging and even purchasing a ADO.NET book, I
discovered what the problem is. The Dataset.Merge command sets all rows to a
rowstate of "unchanged", so that when you call datadapter.Update(dataset),
there are no changes in the dataset to update. I verified this by loading an
empty dataset from an empty table in SQL Server, then loading data into a 2nd
dataset from an identical database & table that had 30 records in it and
merging the 30 record dataset into the empty one. (I could bind this dataset
to a datagrid and see that I had 30 rows of data in it.) However, calling
the dataadapter.Update(Dataset1) still yeiled no updates to the database and
no errors, either.
In the end, I rolled my own "merge" routine by looking at the incoming
dataset and selecting data from the local dataset based on PKeys and
comparing rows & columns. It works great, but seems silly that the .Merge
wouldn't let me do the same thing.
I'd be interested in hearing from someone at microsoft if this is a bug, an
expected behavior, or if I'm trying to use .merge in a way that it wasn't
intended.
The end goal of my project was to have a generic class that I could use to
take data from webservices at many different stores (with identical
databases) and add/update the data in a corporate database without having to
have specific stored procs or routines for each table. I think I have
accomplished this goal, but it isn't nearly as elegant or easy as I thought
it would be with dataset.merge.
Thanks again for your response.
-Ray!!!
""Andrew Conrad"" wrote:
> Try not accepting changes on the source DataTable (take out
> fn_IncomingDS.Tables(iTableCount).AcceptChanges()).
>
> Andrew Conrad
> Microsoft Corp
> http://blogs.msdn.com/aconrad/
>
>