Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with TableUpdate(.F.) being slow
Message
From
12/10/1999 12:36:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Help with TableUpdate(.F.) being slow
Miscellaneous
Thread ID:
00275506
Message ID:
00275506
Views:
62
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
Next
Reply
Map
View

Click here to load this message in the networking platform