MySQL Connector/Net
MySqlHelperExecuteScalar Method (String, String, MySqlParameter) |
Execute a single command against a MySQL database.
Namespace: MySql.Data.MySqlClient
Assembly: MySql.Data (in MySql.Data.dll) Version: 6.9.9

public static Object ExecuteScalar( string connectionString, string commandText, params MySqlParameter[] commandParameters )
Public Shared Function ExecuteScalar ( connectionString As String, commandText As String, ParamArray commandParameters As MySqlParameter() ) As Object
public: static Object^ ExecuteScalar( String^ connectionString, String^ commandText, ... array<MySqlParameter^>^ commandParameters )
static member ExecuteScalar : connectionString : string * commandText : string * commandParameters : MySqlParameter[] -> Object
Parameters
- connectionString
- Type: SystemString
Settings to use for the command - commandText
- Type: SystemString
Command text to use for the command - commandParameters
- Type: MySql.Data.MySqlClientMySqlParameter
Parameters to use for the command
Return Value
Type: ObjectThe first column of the first row in the result set, or a null reference if the result set is empty.
