SqlSpCommand is the class used to execute SQL commands within Stored Procedures, UDFs, and triggers.
Public Methods
int AffectedRows()
Return the number of rows affected by a command.
int Execute()
Execute a FairCom DB SQL command after it has been prepared with Prepare().
int ExecuteNonQuery(string SqlCommand)
Execute a FairCom DB SQL command directly without the need for a previous preparation of the statement. Should the command generate a result set, it will be automatically closed and there is no possibility to fetch it. In such case use the Prepare() followed by the Execute() methods.
bool IsProcedureCall()
Return an indication if the statement is a SP call or not.
bool IsSelect()
Return an indication if the statement is a “SELECT ...” or not.
bool MoveNext()
Retrieve the next row from cursor.
int Prepare(string SqlCommand)
Prepare a SQL statement for execution. To execute the statement, use Execute().
Public Read-Only Properties
SqlSpRow CurrentRow
Get the current row in a recordset returned by the Execute method.
SqlSpRow Parameter
Get the parameters (organized as a row) for the command (to be set before Execute, and get after Execute).
string ErrorMessage
Return the last error’s message text.