/// <summary> /// Extracts the data contained in the ADO recordset and stores it in /// XmlSource. If there is another recordset, then the first was actually /// Extended attributes metadata, so that document is move to XmlExtendedAttributes, /// and the data in the second recordset is store into XmlSource. /// </summary> private void GetSource() { ADODB.Connection oConn = null; if (oRs == null) { OpenRecordset(CreateCommand(ref oConn)); } MSXML2.DOMDocument D1 = new MSXML2.DOMDocumentClass(); // load the 1st dataset oRs.Save(D1, ADODB.PersistFormatEnum.adPersistXML); XmlSource = new XmlDocument(); XmlSource.LoadXml(D1.xml); object RecordsAffected; oRs = oRs.NextRecordset(out RecordsAffected); if (oRs != null && oRs.State == 1) { XmlExtendedAttributes = XmlSource; // Load the 2nd dataset oRs.Save(D1, ADODB.PersistFormatEnum.adPersistXML); XmlSource = new XmlDocument(); XmlSource.LoadXml(D1.xml); } if (oRs != null && oRs.State == 1) { oRs.Close(); } if (oConn != null) { oConn.Close(); } }