Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Do you want to change one record in particular of the currently available one?

 

to iterate the records -

 

foreach(DataRow dr in dt.Rows)

{

//change the data in the current record (DataRow)

}

 

To get a particular record you would need a query to get the record such as -

 

Select SomeRecordColumnData from mytable where SomeOtherRecordsColumnData = "SomeParticularData";

 

Then you should have a dataset with one datatable with one DataRow or record.

Change it by something like-

 

dr["SomeRecordColumnData"] = "Some new data";

 

Then you have to use the dataAdaptors's Update method to 'merge' your data set with the original database.

 

hth,

Mick.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...