Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with VFP and Excel 2000?...
Message
De
26/12/1999 21:24:03
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00308023
Message ID:
00308683
Vues:
66
Hiya GT,

I'll try to dupe it in NT tomorrow and will post the results here.

>Hiya Gonz (and troops),
>
>Well, I found the problem, and, IMHO, it's about as nasty and insidious a bug (and I mean bug) as you or I'll run into. I'd like to say it was simply a memory leak, but because the "problem" is corrected when you quit VFP, it really doesn't, IMO, qualify.
>
>First, of all what causes it. If you iterate through the cells in a range via somthing like FOR EACH oCell IN oRange, it pops up. Without this, it doesn't happen.
>
>Now, I've tried just about everything I can think of to correct this without success. I've explicitly set the properties holding the references to NULL in the object's Destroy event. Additionally, I've set any copies of the properties to NULL and issued an explicit RELEASE... to the variables that hold the references with no change.
>
>The reason that I've zeroed in on the FOR EACH loop is that remarking it out causes the problem to go away.
>
>Fixes? Well, QUITting is one. CLEAR ALL is another. Neither of these, however, is terribly desirable. I can work with CLEAR ALL by re-initializing the application object, but somehow, to me, that seems less than a satisfactory solution. Especially when one of the members of the object holds the user name and password to connect to SQL Server.
>
>What makes it especially nasty, as far as I'm concerned, is that repeated calls create additional copies of Excel. While they're cleared with either of the above methods, they do present a significant amount of additional overhead. When the posibility exists of there being 10 or so references like this for my application, it is significant.
>
>I would appreciate it if someone can verify that this also occurs under NT. All that has to be done (as far as I know) is get a reference to a range and iterate through the cells in the range using the technique described above. I'll post the actual code that does this tomorrow afternoon. This doesn't seem like it would be a Windows problem, however. I'll really be surprised if it doesn't happen under NT as well.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform