Consultor Eletrônico



Kbase 21408: ADO (ActiveX Data Object): RecordCount Returns -1
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/10/2008
Status: Verified

SYMPTOM(s):

Using ActiveX Data Objects (ADO) from a Visual Basic program to access the Progress database

The RecordCount property returns a value of -1 instead of the correct record count

CAUSE:

The RecordCount property returns a value of -1 because ADO (ActiveX Data Objects) cannot determine the number of records in the recordset. The number of records cannot be determined if the CursorLocation property has been set to or left at the default value of '2' (i.e. adUseServer)

FIX:

Modify the application source code and change the CursorLocation property to 3 (i.e. adUseClient)