다음을 통해 공유


ExecuteScalar 메서드 (StringCollection)

Executes a batch of Transact-SQL statements and returns the first column of the first row as an object value.

네임스페이스:  Microsoft.SqlServer.Management.Common
어셈블리:  Microsoft.SqlServer.ConnectionInfo.dll의 Microsoft.SqlServer.ConnectionInfo

구문

‘선언
Public Function ExecuteScalar ( _
    sqlCommands As StringCollection _
) As Object()
‘사용 방법
Dim instance As ServerConnection
Dim sqlCommands As StringCollection
Dim returnValue As Object()

returnValue = instance.ExecuteScalar(sqlCommands)
public Object[] ExecuteScalar(
    StringCollection sqlCommands
)
public:
array<Object^>^ ExecuteScalar(
    StringCollection^ sqlCommands
)
member ExecuteScalar : 
        sqlCommands:StringCollection -> Object[] 
public function ExecuteScalar(
    sqlCommands : StringCollection
) : Object[]

매개 변수

반환 값

형식: array<System. . :: . .Object> [] () [] []
An object array value that specifies the first column of the first row for each result set.