Updating a specific Row in a DataSet

G

Guest

I am trying to update a specific row in a dataset without knowing it's Key
Identity all I have is the value of the "Email" collumn.

I have tried: DataSet5.Tables("Customers").Rows.Find(Email) but that
generates an error.

What is the best way to do this?

Thanks, Justin.
 
K

Karl Seguin

You can use SELECT instead of find...

dim foundRows as DataRow() = DataSet5.Tables("Customers").Select("Email = '"
& email & "'")

if foundRows.Length = 1 then 'the row was found
dim row as DataRow = foundRows(0)
....
else 'row wasn't found
...
end if
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top