FIX: "Rowset Cannot Be Loaded Because the Stream Is Invalid" Error Occurs When You Marshal an Array of Recordsets (257953)
The information in this article applies to:
- Microsoft Data Access Components 2.5
- Remote Data Service for ADO 2.5
This article was previously published under Q257953 SYMPTOMS
When you use the Windows 2000 release of MDAC 2.5 (version 2.50.4403) and you marshal a variant array that contains two or more ActiveX Data Objects (ADO) recordsets, the following error may occur:
Run-time error '-2147024846 (80070032)
Rowset cannot be loaded because the stream is invalid.
This error occurs in a completely random and unpredictable fashion. Its occurrence depends on the data in the stream that is being marshaled.
CAUSE
When a rowset is read into the client application, an internal buffer is used to contain data from the stream. Each rowset stream contains a token at the beginning that identifies the nature of the stream. When the rowset is of just the right size so that the token for the next rowset is broken up across the end of the buffer, the buffer must be refilled to collect the rest of the token. However, the pointer is not being correctly repositioned to the beginning of the rowset.
RESOLUTION
To resolve this problem, you can either:
Workaround
To work around this problem, use any of the following methods:
- Return a single rowset from the method, rather than an array of rowsets.
- Rearrange the order of the rowsets in the array so that the rowset causing the problem is the last rowset in the array. This would generally require that you know which rowset is generating the error, however, and it might still not completely avoid the problem.
- Separate the recordsets with other variant objects, such as character strings.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Windows 2000 Service Pack 1.
Modification Type: | Minor | Last Reviewed: | 10/12/2005 |
---|
Keywords: | kbHotfixServer kbQFE kbBug kberrmsg kbfix kbQFE kbWin2000sp1Fix KB257953 |
---|
|