FIX: Creating Fabricated Hierarchical Recordset Fails Using MDAC 2.1SP2 (240341)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.1 SP2
- ActiveX Data Objects (ADO) 2.5
This article was previously published under Q240341 SYMPTOMS
When trying to create a fabricated (programmatic) hierarchical recordset using MDAC 2.1 SP2 (build 4202), the following error is generated:
Run-Time error '-2147467259 (80004005)':
Unspecified error
This error occurs on the line that sets the child recordset to the child chaptered command. This line of code might look like:
Set rsChild = rsParent("ChildCommand").Value
where:
rsChild is the the child recordet,
rsParent is the parent recordset,
ChildCommand is the child chaptered command.
CAUSE
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
RESOLUTION
If you are using ADO 2.1 sp2 (build 4202), there is a workaround for this bug; simply add a line of code that sets the ActiveConnection of the parent recordset to Nothing. Your code might look like this:
.........
Set rsParent.ActiveConnection = Nothing
Set rsChild = rsParent.Fields("ChildCommand").Value
.........
STATUS
Previous releases of MDAC 2.1 did not have this problem. This bug was corrected in Microsoft Data Access Components 2.5 (MDAC 2.5) and later.
You can download the latest version of Microsoft Data Access Components from the following Microsoft Web site:
REFERENCESFor additional information about MDAC release history, click the article number below
to view the article in the Microsoft Knowledge Base:
231943 INFO: Microsoft Data Access Components (MDAC) Release History
For additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
196029 HOWTO: Create Hierarchical Recordsets Programmatically
Modification Type: | Minor | Last Reviewed: | 4/22/2003 |
---|
Keywords: | kbADO250Fix kbbug kbfix kbMDAC250fix kbMDACNoSweep KB240341 |
---|
|