Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with TableUpdate(.F.) being slow
Message
De
12/10/1999 12:36:58
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Help with TableUpdate(.F.) being slow
Divers
Thread ID:
00275506
Message ID:
00275506
Vues:
63
I have the following code for adding a record. The Tableupdate takes about six seconds. Everything else the app does is almost instantaneous. Any ideas to speed it up would really be appreciated.

select sample
saverec = recno()
go bott
lastrec = sampleid

append blank
replace sampleid with lastrec + 1
messagebox("before") (Put these here to be sure this was slow part)
tableupdate(.F.)
messagebox("after")

thisform.cmdEnterTest.enabled = .T.
thisform.refresh

This is from help and I think it may apply but I don't what to change.
The table has about 30 fields and 10 small indexes including 1 primary index on sampleid.

Note Calling TABLEUPDATE( ) for a local table or view that doesn’t use key fields generates a long WHERE clause to find the update row. The default number of fields supported in the WHERE clause is 40. If you receive the error 1812 - SQL: Statement Too Long, you should either use a key field for the update or increase the complexity of the WHERE clause with SYS(3055). If you use SYS(3055), increase its value to 8 times the number of fields in the table:

Thanks,
Gary
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform