Update does not release lock.

  • Thread starter Thread starter TOMJ
  • Start date Start date
T

TOMJ

I loop thru a query that contains 16500 records using
Movenext and update 1 field. Half way thru I get an
error "File sharing lock count exceeded".

The code is very simple:

Edit

Field = X

Update

I've checked all my record locking settings and they are
pretty standard:
"Open database using record level locking" is YES

The default max # of record locks is 9500 (which is
standard) but this should not come into play as the
Update method unlocks the record. The number of records
updated is just under 9500 so I conclude that the Update
is NOT releasing the record.
 
I do not know why you are this error, but I wonder why you don't update all
16500 records with one Sql Update query. It will probably run several
orders of magnitude faster and almost assuredly make the problem go away.
If you post the DDL and your update requirements I am sure someone here can
create the Sql statement necessary to do this.

Ron W
 
Back
Top