General information
Title:
Help with TableUpdate(.F.) being slow
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only