- Create a command object.
- Specify the store procedure name.
Cmd.CommandText = "nameOfStoredProc";
- Set the CommandType property of the command object to the CommandType.StoredPrcedure enumeration value.
Cmd.CommandType = CommandType.StoredProcedure;
- Declare parameters and configure the values for the parameters.
SqlDBParameter = p1, p2;
p1 = Cmd.Parameters.Add ("nameOfParameter", SqlDbType.Integer);
p1.Direction = ParameterDirection.Input;
p1.Value = value;
- Execute the command object
Cmd.ExecuteReader ();
Steps involve in execution of stored procedure.
Subscribe to:
Post Comments
(
Atom
)
0 comments :
Post a Comment