ExecuteScalar Method
Executes a sql statement against the connection and returns one scalar value.

Namespace: SSIS.Test
Assembly: SSIS.Test (in SSIS.Test.dll) Version: 3.0.0.236 (3.0.0.236)

Syntax

C#
public Object ExecuteScalar(
	string commandText
)
Visual Basic
Public Function ExecuteScalar ( _
	commandText As String _
) As Object
Visual C++
public:
Object^ ExecuteScalar(
	String^ commandText
)

Parameters

commandText
Type: System..::..String
Sql command to execute.

Return Value

The first column of the first row. Other rows and columns are ignored.

See Also