Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scan!!
Message
De
29/05/1997 16:09:33
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Scan!!
Divers
Thread ID:
00034138
Message ID:
00034164
Vues:
34
>>>>>I am using scan command everytime the form load up, so it calculate every single record. (I want to make sure whatever client enter is being calculate)
>>>>>scan
>>>>> **calculation
>>>>>endscan
>>>>>
>>>>>I want to know is there any other faster command can get the job done faster. Now, everytime client load the form it take 1 minute or so to open up and that's with 16 meg of ram. I can't imagine if the client have less than 16meg of ram, it probably take a while to load.
>>>>
>>>>If you don't care about deleted records, then use RECCOUNT(), otherwise use COUNT ... FOR NOT DELETED() and create index tag for NOT DELETED().
>>>
>>>Sorry Edward, I think you misunderstood my question. I am trying to calculate whatever the user have input in a textbox, I could do the calculation in the keypress event, but then the user have to press tab or whatever to execution the calculation. So that why I had use scan command during load up to calculate every record in the table and store the new value in a specific field.
>>
>>But why do you need to calculate for every record. It's much simpler either make recalculations exactly when record gets updated (trigger?) or even not to use 'recalculated field' but expression as controlsource for some textbox (grid column), eh?
>
>How do I know that the user had update which record and when should I do the calculation?? I do have controlsource for all my textbox within the pageframe, but how can I let the user see the immediate result of the calculation on the screen once they finish entering data??

I surely don't know, but you (and your app) must know when user updates a record. If you use Data Buffering, it's happened when you issue TABLEUPDATE(). If you don't use Data Buffering you should have some button on form (e.g. 'Save') which allows user to click on it and save a record.
That's not a big deal to show immediate result of data entry, just look at and select from some helpful textbox events like LostFocus, InteractiveChange, ProgrammaticChange and many more.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform