Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Load whole table into Memory
Message
De
21/08/2007 07:28:07
Suhas Hegde
Dental Surgeon
Sirsi, Inde
 
 
À
21/08/2007 05:25:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
01249262
Message ID:
01249309
Vues:
27
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform