Gemstone Data Library
Show/Hide TOC

# AdoDataConnectionExecuteScalar(String, Object) Method

Executes the SQL statement using Connection, and returns the value in the first column of the first row in the result set.

## Definition

Namespace: Gemstone.Data
Assembly: Gemstone.Data (in Gemstone.Data.dll) Version: 1.0.158 -- Release Build+a7370acff9f7a1e0ca1927f709880b2a82e0bdf0
C#
View Source Request Example

    public Object? ExecuteScalar(
    	string sqlFormat,
    	params Object?[] parameters
    )

VB
View Source Request Example

    Public Function ExecuteScalar (
    	sqlFormat As String,
    	ParamArray parameters As Object()
    ) As Object

C++
View Source Request Example

    public:
    Object^ ExecuteScalar(
    	String^ sqlFormat,
    	... array<Object^>^ parameters
    )

JavaScript
View Source Request Example

    function ExecuteScalar(sqlFormat, ... parameters);

#### Parameters

sqlFormat String
  Format string for the SQL statement to be executed.
parameters Object
  The parameter values to be used to fill in DbParameter parameters.

#### Return Value

Object
Value in the first column of the first row in the result set.

## See Also

#### Reference

AdoDataConnection Class
ExecuteScalar Overload
Gemstone.Data Namespace