Mediachase FileUploader.NET 1.9 Framework Help

SqlHelper.ExecuteScalar Method (SqlContext, CommandType, String, SqlParameter[])

Execute a SqlCommand (that returns a 1x1 resultset and takes no parameters) against the database specified in the connection string.

[Visual Basic]
Overloads Public Shared Function ExecuteScalar( _
   ByVal context As SqlContext, _
   ByVal commandType As CommandType, _
   ByVal commandText As String, _
   ParamArray commandParameters As SqlParameter() _
) As Object
[C#]
public static object ExecuteScalar(
   SqlContext context,
   CommandType commandType,
   string commandText,
   params SqlParameter[] commandParameters
);

Parameters

context
the current context/
commandType
the CommandType (stored procedure, text, etc.)
commandText
the stored procedure name or T-SQL command
commandParameters
an array of SqlParamters used to execute the command

Return Value

an object containing the value in the 1x1 resultset generated by the command

See Also

SqlHelper Class | Mediachase.FileUploader Namespace | SqlHelper.ExecuteScalar Overload List