Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Load whole table into Memory
Message
From
21/08/2007 07:28:07
Suhas Hegde
Dental Surgeon
Sirsi, India
 
 
To
21/08/2007 05:25:55
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:
01249309
Views:
25
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform