Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data session is not destroyed
Message
 
 
To
28/09/2004 08:14:39
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00944874
Message ID:
00946764
Views:
24
Vassili,

So the data session doesn't hang if the loop only executes once, but does hang if the loop executes more than once?

What happens if you:
loMyRange = THIS.oDoc.Content

DO WHILE loMyRange.Find.Execute ("@@", , , , , , , , , "", 1)
  loMyRange.Delete(1,MarkerLength)
  loMyRange.InsertAfter( DataToBeInserted)
  loMyRange = .null.
  loMyRange = THIS.oDoc.Content
ENDDO

loMyRange = .null.
Something else to lookout for is using FOR EACH those can cause internal dangling references.

And like Nadya suggests you should set this.oDoc = .null. at some point in your destruct sequence.

>There is no difference how to close Word and no Winword process in the Task Manager.
>But I note that the problem does not appear if only one piece of Word document to be replaced in loop:
>
>loMyRange = THIS.oDoc.Content
>
>DO WHILE loMyRange.Find.Execute ("@@", , , , , , , , , "", 1)
> loMyRange.Delete(1,MarkerLength)
> loMyRange.InsertAfter( DataToBeInserted)
> loMyRange = THIS.oDoc.Content
>ENDDO
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform