ousoonerjoe
Programmer
I have been looking around at how to use ADO in VB6 to read/write XML. The source file is XML, the destination is SQL 2000, and will need to output a recordset to XML. I need to do some scrubbing of the data before importing otherwise i would just make DTS do all the work. I vaguely remember ADO 2.5 and better, being available to use for XML. I found a site that got into how to do the read aspect. It looks like it would work, but the "Source XML file is incomplete or invalid" error appears. I am very unfamiliar with XML, but am eager to do this project and learn more about it.
I have sifted through many of the other topics on this board, but each seem to lead me into the same type of error.
Here is a snip it of the XML file. (Other fields omitted from sample for ease of reference.):
Function used to access XML with ADO:
ADO and MSXML both seem to be "puking" on this. Any tips or ideas are welcome and appreciated.
"If I were to wake up with my head sewn to the carpet, I wouldn't be more surprised than I am right now.
I have sifted through many of the other topics on this board, but each seem to lead me into the same type of error.
Here is a snip it of the XML file. (Other fields omitted from sample for ease of reference.):
Code:
<ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<w5file PostTransferClaimID="12821" Claimid="31625" PolicyID="629" />
<w5file PostTransferClaimID="13190" Claimid="29834" PolicyID="49162"/>
<w5file Claimid="32291" PolicyID="22766" />
<w5file PostTransferClaimID="11461" Claimid="30828" PolicyID="29376"/>
</ROOT>
Function used to access XML with ADO:
Code:
Public Function LoadRsFromXML(FullPath As String) As ADODB.Recordset
Dim Rst As ADODB.Recordset
Set Rst = New ADODB.Recordset
Rst.Open FullPath, "Provider=MSPersist;", adOpenForwardOnly, adLockReadOnly, adCmdFile
End Function
ADO and MSXML both seem to be "puking" on this. Any tips or ideas are welcome and appreciated.
"If I were to wake up with my head sewn to the carpet, I wouldn't be more surprised than I am right now.