ADO.NET Interview questions


Total available count: 25
Subject - Microsoft Technologies
Subsubject - ADO.NET

Explain about Row States and Row Versions?

A row state indicates the status of a row; row versions maintain the values stored in a row as it is modified, including current, original, and default values.
Both Row States and Row Versions are defined below,
 
RowState value:
  1. Unchanged:  No changes have been made since the last call to AcceptChanges or since the row was created by 'DataAdapter.Fill'.
  2. Added:  The row has been added to the table, but AcceptChanges has not been called.
  3. Modified:  Some element of the row has been changed.
  4. Deleted:  The row has been deleted from a table, and AcceptChanges has not been called.
  5. Detached:  The row is not part of any DataRowCollection. The RowState of a newly created row is set to Detached. After the new DataRow is added to the DataRowCollection by calling the Add method, the value of the RowState property is set to Added. Detached is also set for a row that has been removed from a DataRowCollection using the Remove method, or by the Delete method followed by the AcceptChanges method.
DataRowVersion value:
  1. Current:  The current values for the row. This row version does not exist for rows with a RowState of Deleted.
  2. Default:  The default row version for a particular row. The default row version for an Added, Modified, or Unchanged row is Current. The default row version for a Deleted row is Original. The default row version for a Detached row is Proposed.
  3. Original:  The original values for the row. This row version does not exist for rows with a RowState of Added.
  4. Proposed :  The proposed values for the row. This row version exists during an edit operation on a row, or for a row that is not part of a DataRowCollection.



Next 5 interview question(s)

1
Explain the steps to access the database in ADO.NET?
2
Why will an ASP.NET user account be created in the database for an ASP.NET web application?
3
Can you inherit from SqlConnection class?
4
Explain about asynchronous execution of commands?
5
Explain about SqlCommand.CommandTimeout property?

Comments