ADO.NET Interview Questions and Answers (445) - Page 23

How to Convert Datatable to IEnumerable List in Asp.Net.

We make sure that we have a Datatable with Records.

var data = dt.AsEnumerable().Select(row =>

new
{
emp_Id = row["emp_Id"].ToString(),
emp_Name = row["emp_Name"].ToString(),
PAN_no = row["PAN_no"].ToString()
});

Which statement is true regarding SqlDataReader HasRow property?

NOTE: This is objective type question, Please click question title for correct answer.
Which statement is true concerning SqlDataReader?

NOTE: This is objective type question, Please click question title for correct answer.
Which namespaces are required to enable the use of databases in ASP.NET pages?

The following namespaces are required to enable the use of databases in ASP.NET pages:

The System.Data namespace.
The System.Data.OleDb namespace (to use any data provider, such as Access, Oracle, or SQL)
The System.Data.SQLClient namespace (specifically to use SQL as the data provider)
For using SqlConnection which namespace is required or SqlConnection is part of which namespace?

NOTE: This is objective type question, Please click question title for correct answer.
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories