In ADO.NET, what are the different ways to call a stored procedure?

  • Call() method, Invoke() method, ExecuteProcedure() method, Run() method
  • CommandText property, ExecuteNonQuery() method, ExecuteReader() method, ExecuteScalar() method
  • ExecuteNonQuery() method, ExecuteScalar() method, ExecuteReader() method, Execute() method
  • ExecuteStoredProc() method, ExecuteStoredProcedure() method, ExecuteSP() method, CallStoredProc() method
In ADO.NET, you can call a stored procedure using the ExecuteNonQuery() method to execute a command that doesn't return any result set, ExecuteScalar() method to execute a command that returns a single value, and ExecuteReader() method to execute a command that returns a result set. The Execute() method can also be used to execute any type of command.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *