ADO.NET Question:

What is the ExecuteScalar method?

ADO.NET Interview Question
ADO.NET Interview Question

Answer:

// Summary:

Executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.

// Returns:

The first column of the first row in the result set, or a null reference (Nothing in Visual Basic) if the result set is empty.


Previous QuestionNext Question
Explain ExecuteNonQuery?Which one of the following objects is a high-level abstraction of the Connection and Command objects in ADO.NET?