Shunde.NET Framework Class Library

DBUtils.GetIntFromSqlSelect Method (SqlCommand)

Executes an SQL Query that is known to return just one integer Value

public static int GetIntFromSqlSelect(
   SqlCommand sqlCommand
);

Parameters

SqlCommand

Return Value

Returns the integer Value returned by the SQL statement

Remarks

To use this, set the column Name holding the integer to intValue. If no results are found, or more than 1 result is found, or intValue is an invalid column Name or does not hold an integer, a MiscException will be thrown

See Also

DBUtils Class | Shunde.Utilities Namespace | DBUtils.GetIntFromSqlSelect Overload List