PRB: NextRecordset Never Returns Null or Nothing (189838)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.0
- ActiveX Data Objects (ADO) 2.1 SP2
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- ActiveX Data Objects (ADO) 2.7
This article was previously published under Q189838 SYMPTOMS
If you declare your recordset variable with the New keyword in the
declaration on the object, the variable never returns nothing. This
behavior could cause problems when using multiple recordsets and looping
through the recordsets using the NextRecordset until the recordset returns
nothing.
CAUSE
This occurs because the act of checking for nothingness instantiates the
object.
RESOLUTION
To avoid this problem, do not declare the recordset object with the New
keyword in the declaration.
STATUS
This behavior is by design.
Modification Type: | Minor | Last Reviewed: | 3/2/2005 |
---|
Keywords: | kbprb KB189838 |
---|
|