Hi,
"msnews.microsoft.com" <A
...@B.COM> wrote in message
news:e2oXGcKwDHA.2352@TK2MSFTNGP09.phx.gbl...
> I need to copy data between 2 sql servers using ado.net
> this is currently done in vb6/ado record by record for the tables in a
> config file
> Since a dataset is disconnected, is there a way to pull all the data
that's
> required, set the row status flags to new record
Knowing which records are required is gona to be hard.
For new records:
One way would be to query target server for the last record id (in case you
have an autoincrement pk or something) and fetch only newer records from
source server.
For updates: you'll have to compare one ore more colums. (timestamp column
would be the best IMO)
Set AcceptChangesDuringFill to false - that will leave rows as "new" when
filled to datatable.
For updated rows you'll have to invoke AcceptChanges() on that row and
change a field to itself (that will cause the row to be marked as Modified).
, and call database update
> using this dataset
No problem on that if your data in dataset is configured ok.
--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com