GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Microsoft  >  ADO.NET 2.0

 Print  |  
Question:  Explain about rowstate in a dataset table?



January 01, 2008 20:22:18 #2
 Lavanyaaru   Member Since: January 2008    Total Comments: 10 

RE: Explain about rowstate in a dataset table?
 
contd...

A newly created DataRow has its RowState set to Detached until it is added to the DataRowCollection via the DataRowcollection::Add method. 
The RowState is initialized to Added until the DataRow::AcceptChanges method is called, at which point the RowState becomes Unchanged. 
If you call DataRow::Delete, the row's RowState becomes Deleted, and subsequently calling DataRow Collection::Remove (or DataRowCollection::RemoveAt) will not affect its RowState. The opposite is also true: Removing a DataRow from a Data RowCollection sets the row's RowState to Detached, but subsequently deleting it will not alter its RowState value.
     

 

Back To Question