조회를 실행하고 결과 세트를 데이터로 채우며 결과 세트의 레코드 계수(행 수)를 리턴합니다.
TheExecuteAndCountRecords 메소드는 EnableRecordCount, Execute, GetRecordCount 메소드의 결합된 기능을 제공합니다.
이 메소드가 리턴되면 커서는 첫 번째 레코드 앞에 위치합니다. 첫 번째 레코드의 값을 검색하기 전에 MoveNext 메소드를 호출해야 합니다. 레코드에서 값을 검색하려면 GetColumnValue 메소드를 사용하십시오.
MaxResultSetRows 메소드를 사용하여 결과 세트를 제한할 수 있습니다.
VBScript
' You can use this one line: rows = resultset.ExecuteAndCountRecords ' rather than these three lines: ResultSet.EnableRecordCount ResultSet.Execute rows = ResultSet.RecordCount
Perl
# You can use this one line: $rows = $resultset->ExecuteAndCountRecords(); # rather than these three lines: $resultset->EnableRecordCount(); $resultset->Execute(); $rows = $resultset->GetRecordCount();