Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Spelling checking really slow
Message
From
31/10/2004 15:47:04
Thomas Ganss (Online)
Main Trend
Frankfurt, Germany
 
 
To
31/10/2004 14:02:04
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00956184
Message ID:
00956319
Views:
12
>
>Could you elaborate more on this approach? Any code sample?
AFAIR it is quite well explained in the vfp help.
You should use createobjectEX and perhaps define all variables "AS ....".
(I am not sure that the define as is a necessary part for early binding or if it is only necessary for the IDE - vfp variable structure makes me guess the former.)
If called this way and as soon as the vfp IDE shows the COM pem's during editing it is IMHO safe to assume early binding is in effect.

There is also an older article in MSDN on vfp, performance and COM showing that if each object has to be discovered across COM [loCOM.Tables[1].Sheet[1].Cell[i, j] or something similar from excel] in a single line this can put a serious damper on performance. I think the article was still vfp6 based and put only forward as tip the hint to set a object reference "down the line" of the COM object.

Instead of
for lnRun = 1 To
  lctext = loCOM.Tables[1].Sheet[1].Cell[i, lnRun]
endfor
use
loObj = loCOM.Tables[1].Sheet[1]
for lnRun = 1 To
  lctext = loObj.Cell[i, lnRun]
endfor
How the "for each" works in this aspect (you have to "get" the object FROM COM as well: DUNNO <g>.
Here I'ld try walking explicitly [via index] across the lowest, already early bound COM object reference.

HTH

thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform