Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data session is not destroyed
Message
 
 
À
28/09/2004 08:14:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00944874
Message ID:
00946764
Vues:
25
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform