I have a VFP program that loads a 5.9MB XML file into an instance of XMLDOM. In one part of the code I have a loop that builds a string that eventually looks something like,
"INSERT INTO CSRJUNK (F1, F2, F3) VALUES ('TEST1', 'TEST2', 'TEST3')"
This string is then macro executed to do the actual record insertion. The syntax to build part of the string is:
FOR m.li = 0 TO m.liNumDesc-1
m.lcmd = m.lcmd + ["] + oChildNode.ITEM(m.li).TEXT + [",]
ENDFOR
This loop executes 63000 times and takes close to 8 minutes to complete. I've checked this using a Coverage Profiler tool. I believe that the bottleneck is the oChildNode object. Somehow VS2005 manages to load it very quickly.
Can anyone suggest if it can be sped up and how?
TIA
Mike