ADO.NET INTERVIEW QUESTION & ANSWERS
11. |
What method is used by the Command classes to execute SQL statements that return single values? |
|
The Execute scalar method executes SQL commands that return single values. |
12. |
What is the use of command Object? |
|
There are used to connect connections object to Data reader or data set.-
Execute Non Query
- Execute Reader
- Execute Scalar
|
13. |
Define Execute Non Query? |
|
Executes the command defined in the command text property against the connection defined in the connection property for a query that does not return any row (Insert, Update or Delete).Returns an integer indicating the number of rows affected by the query. |
14. |
Define Execute Reader? |
|
Executes the command defined in the command text property against the connection defined in the connection property.Returns a reader object that in connected to the resulting row set within the data base, allowing the rows to be retrieved. |
15. |
Define Execute Scalar? |
|
Executes the command defined in the command text property against the column defined in the connection property.Returns only single value the first column of the first row of the resulting row set any other returned columns and rows are discarded. |