ExecuteScalar 메서드 (String)
Executes a Transact-SQL statement 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 ( _
sqlCommand As String _
) As Object
‘사용 방법
Dim instance As ServerConnection
Dim sqlCommand As String
Dim returnValue As Object
returnValue = instance.ExecuteScalar(sqlCommand)
public Object ExecuteScalar(
string sqlCommand
)
public:
Object^ ExecuteScalar(
String^ sqlCommand
)
member ExecuteScalar :
sqlCommand:string -> Object
public function ExecuteScalar(
sqlCommand : String
) : Object
매개 변수
- sqlCommand
형식: System. . :: . .String
A String value that specifies the Transact-SQL command to be executed.
반환 값
형식: System. . :: . .Object
An Object system object value that specifies the first column of the first row of the result set.