Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Load whole table into Memory
Message
From
21/08/2007 08:40:45
 
 
To
21/08/2007 07:28:07
Suhas Hegde
Dental Surgeon
Sirsi, India
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
01249262
Message ID:
01249330
Views:
15
>>You got me prety confused here;
>>I believe you would be better off without using arrays but one (or more) tmp cursor having desired values as fields.
>>Simply seek symbol value then to scan while and insert into result cursor.
>>That will be sure very fast.
>>Here is meta code which might get you started (Aldough I still don't understand what you wanted to achieve)
>>
>>
>>
>>select bhav_data
>>local aa(1)
>>afields(aa)
>>create cursor syBhav from array aa
>>alter table alias() add column nOpen N(12,2)
>>alter table alias() add column nHigh N(12,2)
>>alter table alias() add column nLow N(12,2)
>>*etc
>>.
>>.
>>
>>** then indexes you need for post processing
>>INDEX ON DTOS(DATE)+SYMBOL TAG PK
>>index on symbol+dtos(date) tag pk1   && Not present in the link below
>>.
>>.
>>somesymbol=YourForm.sometextbox.value
>>select bhav_data
>>seek somesymbol
>>scan while bhav_data.symbol= somesymbol
>>   scatter memvar
>>   m.nOpen = mton(open)
>>   m.nHigh = mton(high)
>>   m.nLow  = mton(low)
>>   .
>>   .
>>   insert into syBhav from memvar
>>
>>
>>endscan
>>
>>select syBhav
>>browse normal
>>
>>*then you do something with that result set.
>>
>>
>>
>>Of course sql statement can do the same thing, it is just that this way
>>you might have some more flexibility.
>>
>>That temp cursor can contain all values you planned to stick into arrays
>>per one sysmbol value and thus be reasonably easier to digest.
>>
>>You don't need to blow up cashe :)
>>
>>HTH
>
>
>I need the results in a array to feed the FLL

Ok, then you can preprocess data within cursors and then populate arrays from there. You will sure have easier ride then looping trough array elements
and doing it from there.
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform