newrow rowstate modified?

P

Pipo

Hi,

I read data from files.
Dim row As DataRow = Source.NewRow

row("ID") = strData(1)

row("data2") = strData(0)

row("data3") = strData(2)



row("Processed") = blnDeleted

Source.Rows.Add(row)

I know that the records exists in the database but I want them to be
updated.
The problem is that the rowstate now is added, this must become modified so
the updatecommand kicks in (for about ten of thousands of records!)

How can this be done?

tia
 
M

Miha Markic [MVP C#]

Hi Pipo,

Do
row.AcceptChanges
and then
row("data2") = row("data2") ... or use any other writeable column
 
P

Pipo

Thanks Miha


Miha Markic said:
Hi Pipo,

Do
row.AcceptChanges
and then
row("data2") = row("data2") ... or use any other writeable column

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Pipo said:
Hi,

I read data from files.
Dim row As DataRow = Source.NewRow

row("ID") = strData(1)

row("data2") = strData(0)

row("data3") = strData(2)



row("Processed") = blnDeleted

Source.Rows.Add(row)

I know that the records exists in the database but I want them to be
updated.
The problem is that the rowstate now is added, this must become modified
so
the updatecommand kicks in (for about ten of thousands of records!)

How can this be done?

tia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top