You use a SqlCommand command to execute the following stored procedure:

CREATE PROCEDURE dbo.GetCustomerCount
AS
SELECT COUNT(*) FROM Customers

You need to retrieve the result of this SELECT statement.

What should you do?

 Posted by Rajkatie on 8/31/2012 | Category: ADO.NET Interview questions | Views: 1198 | Points: 40
Select from following answers:
  1. Execute the query using SqlCommand.ExecuteScalar and retrieve this method's return value.
  2. Add a parameter named "0" with Direction ParameterDirection.Output. Retrieve its value after executing the command.
  3. Add a parameter named @@RETURN_VALUE with Direction ParameterDirection.ReturnValue. Retrieve its value after executing the command.
  4. All Above

Show Correct Answer


Source: MeasureUp.com | | Alert Moderator 

Comments or Responses

Login to post response