Esempio n. 1
0
 /// <summary>
 /// Creates a SqlCommand object with the relevant properties set
 /// </summary>
 /// <param name="conn">SqlConnection used to execute this command</param>
 /// <param name="commandText">Name of the stored procedure being executed</param>
 /// <param name="parameter">Parameter needed to be passed to the stored procedure</param>
 /// <returns>SqlCommand object with the relevant properties set</returns>
 internal static SqlCommand GetCommand(SqlConnection conn, String commandText, StoredProcedureParameter parameter)
 {
     return(GetCommand(conn, commandText, new StoredProcedureParameter[1] {
         parameter
     }));
 }
Esempio n. 2
0
 /// <summary>
 /// Executes a stored procedure
 /// </summary>
 /// <param name="commandText">Name of the stored procedure being executed</param>
 /// <param name="parameter">Parameter needed to be passed to the stored procedure</param>
 internal static void ExecuteNonQuery(String commandText, StoredProcedureParameter parameter)
 {
     ExecuteNonQuery(commandText, new StoredProcedureParameter[1] {
         parameter
     });
 }
Esempio n. 3
0
 /// <summary>
 /// Executes a stored procedure and returns the single value it generates
 /// </summary>
 /// <param name="commandText">Name of the stored procedure being executed</param>
 /// <param name="parameter">Parameter needed to be passed to the stored procedure</param>
 /// <returns>Single value generated by the stored procedure</returns>
 internal static object ExecuteScalar(String commandText, StoredProcedureParameter parameter)
 {
     return(ExecuteScalar(commandText, new StoredProcedureParameter[1] {
         parameter
     }));
 }
Esempio n. 4
0
 /// <summary>
 /// Executes a stored procedure and returns the data it loads
 /// </summary>
 /// <param name="commandText">Name of the stored procedure being executed</param>
 /// <param name="parameter">Parameter needed to be passed to the stored procedure</param>
 /// <returns>DataTableReader object containing all the rows selected by the stored procedure</returns>
 internal static DataTableReader ExecuteReader(String commandText, StoredProcedureParameter parameter)
 {
     return(ExecuteReader(commandText, new StoredProcedureParameter[1] {
         parameter
     }));
 }