Tomas
Fri Sep 02 11:45:34 CDT 2005
Here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadonet/html/datasetenhance.asp
(The article is very long, so this is the excerpt)
To that end, ADO.NET 2.0 introduces two new methods on the DataRow class:
SetAdded and SetModified. Before you ask about setting the state to Deleted,
or Unchanged, let me remind you that with version 1.x we already have the
Delete and AcceptChanges/RejectChanges methods to accomplish this.
Tomas
"Tim Haynes" <TimHaynes@discussions.microsoft.com> pí¹e v diskusním
pøíspìvku news:BE85E922-E035-4945-8077-A7B6ED952F33@microsoft.com...
> Hi,
>
> I took a quick look at msdn2.microsoft.net and didn't see anything that
> leapt out at me. Any idea where the state change property/method is?
>
> Thanks,
>
> Tim
>
>
> "Tomas Vavrda" wrote:
>
>> Hi,
>>
>> unfortunately this is exactly what you will have to do - import rows to a
>> new dataset.
>>
>> The thing you need will be supported in VS.NET 2005, where you will be
>> able
>> to change state of your records, so you will be able to re-insert them.
>>
>> Regards
>>
>>
>> Tomas
>>
>> "Tim Haynes" <TimHaynes@discussions.microsoft.com> pí1e v diskusním
>> poíspivku news:938FF968-3B7F-4167-9F91-47E3CF521027@microsoft.com...
>> > Here's what should probably be a a simple DataSet question
>> >
>> > I have queried a dataset from databaseA and now I want to insert its
>> > contents into databaseB. If I do a DataAdapter.Update(), it only
>> > stores
>> > rows
>> > added since it was queried from databaseA - which is understandable as
>> > it
>> > thinks that they're up to date in the database (but that was a diferent
>> > database!).
>> >
>> > So, how can I tell the DataSet that its rows are out of date and all
>> > need
>> > inserting? I thought I might set DataRow.RowState, but that's a get
>> > only
>> > property.
>> >
>> > Any help appreciated. The only idea I've had so far is to copy all the
>> > rows
>> > to another DataSet.
>> >
>> > TIA
>> >
>> > Tim
>>
>>
>>