Article ID: 264869 - Last Review: November 7, 2003 - Revision: 3.1 PRB: Persisting XML Directly into DOM Causes Run-Time Error '438'
This article was previously published under Q264869 On This PageSYMPTOMS
With Microsoft Data Access Components (MDAC) version 2.1 and later, the ADO Recordset object supports the feature to persist an ADO recordset in XML format to a file on the disk by using the Save method of the ADO Recordset object. This data can then be loaded into the Microsoft XML Document Object Model (DOM) from the persisted file. MDAC 2.5 and later has a feature that saves the ADO recordset directly into the DOM without having to save the data in XML format to a file on disk first. If you try to persist the ADO recordset as XML data directly into the DOM using MDAC 2.1, you receive the following error message:
Run-time error '438' Object doesn't support this property or method CAUSE
Persisting the ADO Recordset directly into an XML DOMDocument object utilizes the ADO Stream object. The Stream object is an ADO object introduced in ADO 2.5. It does not exist in ADO 2.1, ADO 2.1 SP1, and SP2. Versions of ADO earlier than 2.1 do not support XML persistence.
STATUS
This behavior is by design.
MORE INFORMATIONSteps to Reproduce BehaviorThe following Visual Basic code sample demonstrates how to load an MSXML DOMDocument object directly by using the Save method of the ADO Recordset object. This example uses data from the SQL Server Pubs sample database. The preceding error message occurs if this code is run on a computer with a version of MDAC earlier than MDAC 2.5, or by referencing version 2.1 of the ActiveX Data Objects Library.If a newer version of MSXML has been installed in side-by-side mode, you must explicitly use the Globally Unique Identifiers (GUIDs) or ProgIDs for that version to run the sample code. For example, MSXML version 4.0 can only be installed in side-by-side mode. For additional information about the code changes that are required to run the sample code with the MSXML 4.0 parser, click the following article number to view the article in the Microsoft Knowledge Base: 305019
(http://support.microsoft.com/kb/305019/EN-US/
)
INFO: MSXML 4.0 Specific GUIDs and ProgIds To run this code, follow these steps:
APPLIES TO
| Other Resources Other Support Sites
CommunityArticle Translations |






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top