dotConnect for MySQL Documentation
Devart.Data.MySql Namespace / MySqlHelper Class / ExecuteScalar Method / ExecuteScalar(MySqlConnection,String) Method
The MySqlConnection object to use.
Command text to use for the command.

In This Topic
    ExecuteScalar(MySqlConnection,String) Method
    In This Topic
    Execute a single command against a MySQL database and returns a single value as the result.
    Syntax
    'Declaration
     
    Public Overloads Shared Function ExecuteScalar( _
       ByVal connection As MySqlConnection, _
       ByVal commandText As String _
    ) As Object
    public static object ExecuteScalar( 
       MySqlConnection connection,
       string commandText
    )

    Parameters

    connection
    The MySqlConnection object to use.
    commandText
    Command text to use for the command.

    Return Value

    The first column of the first row in the result set, or a null reference if the result set is empty.
    See Also