Groups | Blog | Home
all groups > dotnet distributed apps > march 2004 >

dotnet distributed apps : For Next loop runs in circles on deployment PC


Joan
3/18/2004 6:11:07 PM
I have a For Each Next loop parsing thru an XML doc. When I build and deploy my app.exe on a PC other than the development PC I'm getting the strangest behavior in one of my functions. The application gets caught in the Child4 loop in the code snippet below. There are 8 child nodes of oChild4,but it keeps repeating the first child over and over again in an infinite loop - I have to Endtask to get out of it. This only happens on the deployed app. Not when I run the application on my Dev PC. I dont know if this is enough for anyone to help....I'm completely baffled. Thanks, Joan

For Each oNode In oXMLDoc.documentElement.childNodes
oChild3 = oNode.selectSingleNode("BatchDocs")
For Each oChild4 In oChild3.childNodes
sNodeName = oChild4.nodeName
For Each oChild5 In oChild4.childNodes
sNodeName = oChild5.nodeName
Next oChild5
miBatchCount = miBatchCount + 1
Next oChild4
Hicky
3/22/2004 1:11:09 AM
Do you have an 'On Error Resume Next' statement above this code

----- Joan wrote: ----

I have a For Each Next loop parsing thru an XML doc. When I build and deploy my app.exe on a PC other than the development PC I'm getting the strangest behavior in one of my functions. The application gets caught in the Child4 loop in the code snippet below. There are 8 child nodes of oChild4,but it keeps repeating the first child over and over again in an infinite loop - I have to Endtask to get out of it. This only happens on the deployed app. Not when I run the application on my Dev PC. I dont know if this is enough for anyone to help....I'm completely baffled. Thanks, Joa

For Each oNode In oXMLDoc.documentElement.childNode
oChild3 = oNode.selectSingleNode("BatchDocs"
For Each oChild4 In oChild3.childNode
sNodeName = oChild4.nodeNam
For Each oChild5 In oChild4.childNode
sNodeName = oChild5.nodeNam
Next oChild
miBatchCount = miBatchCount +
Next oChild
AddThis Social Bookmark Button