emzi19
asked on
File sharing lock count exceeded. Increase MaxLocksPerFile registry entry.
Hi,
I am updating the sortordering of over 10,000 records in a recordset.
I get the following error...
Microsoft JET Database Engine error '80040e21'
File sharing lock count exceeded. Increase MaxLocksPerFile registry entry.
I have viewed an article from Microsoft on the problem, but it involves changing registry values to change the MaxLocksPerFile, something which my hosting provider is unwilling to do.
Is there anyway I can split the recordset to update in chunks to stop over 10,000 connections? Or will anything to do with the cursor type help?
.
I am updating the sortordering of over 10,000 records in a recordset.
I get the following error...
Microsoft JET Database Engine error '80040e21'
File sharing lock count exceeded. Increase MaxLocksPerFile registry entry.
I have viewed an article from Microsoft on the problem, but it involves changing registry values to change the MaxLocksPerFile, something which my hosting provider is unwilling to do.
Is there anyway I can split the recordset to update in chunks to stop over 10,000 connections? Or will anything to do with the cursor type help?
.
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../Data/database.mdb"))
SQL3= "SELECT parttable.shortdesc, parttable.longdesc, parttable.Category, vehiclepart.vehicleCategory, vehiclepart.Partsort FROM parttable LEFT JOIN vehiclepart ON parttable.Partno = vehiclepart.partno WHERE parttable.Category = '" & vcategory & "' and vehiclepart.vehicleCategory = '" & vcategory & "';"
Set recordset3 = Server.CreateObject("ADODB.Recordset")
recordset3.Open SQL3, adoCon, 3, 3
response.write(SQL3)
If Not recordset3.eof then
do while not recordset3.eof
shortcode = recordset3.fields("shortdesc")
recordset3("Partsort") = cLng(Request.Form("link"& shortcode &""))
recordset3.Update
recordset3.MoveNext
Loop
End If
Set Recordset3 = nothing
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi, thanks for the comments sybe. I have worked around this to update the database in chunks seperated by ID number - e.g. 0-1000 1000-2000 etc.
Why do you pull lots of fields from the database with which you do nothing?
Remark 2
Why don't you use a direct SQL statement?
Open in new window