PRB: "Already Exists" Error Message Occurs When You Use AddNew Method of RecordsetDef with DataSource Control (256629)
The information in this article applies to:
- Microsoft Office XP Web Components
- Microsoft Office PivotTable Component 9.0 1.0
- Microsoft Office Chart Component 9.0
This article was previously published under Q256629 SYMPTOMS
When you use the AddNew method of the RecordsetDefs collection object with the Office DataSource Control (DSC), you receive the following error message:
Error: An object named "[RecordsetDef Name]" already exists.
You might receive this error message if you use the AddNew method to add a recordset definition with a name that has already been used. The error message occurs even after you delete the recordset definition with the previously used name from the RecordsetDefs collection.
CAUSE
The AddNew method creates a schema row source in addition to a recordset definition. If you specify the Name parameter with AddNew, both a SchemaRowSource object and a RecordsetDef object are created with that name. If either a SchemaRowSource object or a RecordsetDef object with that name already exists, the error message described in the "Symptoms" section occurs.
RESOLUTION
When you use the AddNew method to add a new named recordset definition and schema row source, you must first delete any existing objects from the SchemaRowSources and RecordsetDefs collections that already use that name. This solution is described in more detail in the "More Information" section.
STATUS
This behavior is by design.
REFERENCESProgramming Microsoft Office 2000 Web Components by Dave Stearns, ISBN 0-7356-0794-X
For more information about the Microsoft Office Web Components, please visit the following Web site:
For sample code that demonstrates solutions using the Office 2000 Web Components with VBScript and ASP, see the following article in the Microsoft Knowledge Base: 258187 OWebComp.exe Contains Scripting Samples for the Office Web Components
Modification Type: | Minor | Last Reviewed: | 8/23/2005 |
---|
Keywords: | kbCodeSnippet kbieObj kbOfficeWebChart kbOfficeWebPivot kbPivotTable kbprb KB256629 |
---|
|