Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code takes too long to run
Message
 
 
À
09/08/2006 16:56:06
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 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01144231
Message ID:
01144319
Vues:
15
>>I'm thinking I can do all the processing using a cursor instead and at the end just update the table...
>>
>>Just wondering if it's worth to change the code this way.
>
>Not sure I understand why you are changing the table structure. Is this being done each time and then a throw-away? Why not just define the table initially with the additional columns? Is this by user? If by user, you may want to have a local table with the same key as the curProcess table and then do a JOIN? If you can do this, I have found that an INSERT INTO is much faster than REPLACE .. WITH (particularly over a network). You could even have the second table on the network and still do an INSERT INTO and then a JOIN for report.

Client sends up a spreadsheet. My program creates a table from this spreadsheet, then adds 4 additional fields to this table, processes each record, then creates another spreadsheet, which is sent back to the client.

I was thinking about the problem while waiting for my son's bus and I think I can:

select from the table + add fields in one select into read-write cursor. Once I processed this cursor, delete the original table and copy to the new one. Or may be we even don't need the updated table.

I'm going to make these changes.

Thanks again.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform