Mike:
I agree with Michael Babcock's suggestions - use a cursor and use LOCATE
instead of GO TOP. But that doesn't seem to explain the difference in
your four scenarios.
IIRC, the one that fails is the compiled app on a local VFP 7. Which
leads to a few questions:
a) Is this one system only or several?
b) What is the virtual memory setup? No swap file or too small to start
could do something like this.
c) Is write caching turned off on the local drive?
Seems to me that it has to be something in the loop. I like MB's
thought about getting rid of the NOT EOF().
Dan Covill
On 3/3/2011 5:52 AM, MB Software Solutions, LLC wrote:
> On 3/2/2011 3:02 PM, Mike Copeland wrote:
> <snipped>
>> MESSAGEBOX('Starting to load Grid. Click OK to start...',0+64,'Notice')
>> LOCAL ttimestart,ttimeexp
>> SELECT sku FROM skus into temp WHERE active=1 order by sku
>> SELECT temp
>> GO TOP IN temp
>>
>> ttimestart=seconds()
>>
>> SCAN WHILE !EOF('temp')
>> thisform.ctGrid.addcomboitem(1,temp.sku)
>> ENDSCAN
>
>
> Mike,
>
> Slight tweaks:
>
> > MESSAGEBOX('Starting to load Grid. Click OK to start...',0+64,'Notice')
> > LOCAL ttimestart,ttimeexp
> > SELECT sku FROM skus into CURSOR temp WHERE active=1 order by sku
> > SELECT temp
> > LOCATE
> >
> > ttimestart=seconds()
> >
> > SCAN
> > thisform.ctGrid.addcomboitem(1,temp.sku)
> > ENDSCAN
>
> Not sure if that'll make much difference, but it's known that LOCATE is
> quicker than GO TOP. Also, your SCAN loop doesn't need the WHILE !EOF
> clause.
>
> My comment on the design is that I wouldn't do 23,000 items in a combo,
> but I guess you can't change that now?
>
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.