<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1226" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=250555820-09102003><FONT face=Arial color=#0000ff
size=2>Rocky,</FONT></SPAN></DIV>
<DIV><SPAN class=250555820-09102003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=250555820-09102003><FONT face=Arial color=#0000ff
size=2><<<FONT color=#000000>Any hints?>></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=250555820-09102003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=250555820-09102003><FONT face=Arial size=2> The
database(s) are all on a station or split between a client and
server?</FONT></SPAN></DIV>
<DIV><SPAN class=250555820-09102003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=250555820-09102003><FONT face=Arial size=2> <FONT
color=#0000ff>Besides that, don't use SQL statements when opening the tables,
just open them directly.</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=250555820-09102003><FONT face=Arial size=2><FONT
color=#0000ff></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=250555820-09102003>
<DIV><FONT face=Arial size=2>Set rstTaxRate = db.OpenRecordset<SPAN
class=250555820-09102003>("</SPAN>tblTaxRates")<BR>Set rstRecoveryTable =
db.OpenRecordset("<SPAN
class=250555820-09102003>tbl</SPAN>PrintRecoveryForm")</FONT></DIV></SPAN></DIV>
<DIV><SPAN class=250555820-09102003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=250555820-09102003><FONT face=Arial size=2><FONT
color=#0000ff> JET's trying to use an implicit transaction to handle the
update because of that.</FONT></FONT></SPAN></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Jim Dettman<BR>President,<BR>Online Computer Services of WNY,
Inc.<BR>(315) 699-3443<BR>jimdettman@earthlink.net </FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com]<B>On Behalf Of </B>Rocky Smolin
- Beach Access Software<BR><B>Sent:</B> Thursday, October 09, 2003 12:45
PM<BR><B>To:</B> AccessD@databaseadvisors.com<BR><B>Subject:</B> [AccessD]
File Sharing lock count exceeded <BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Dear List:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am getting an error in a loop which
says:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>File sharing lock count exceeded. Increase
MaxLocksPerFile registry entry.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I don't think that's the solution. The lock
limit should not be exceeded. Somehow I'm not releasing the locks as
they're being created. Is there a trick to doing that? It blows at
different counts, too. Sometimes over 70,000 records get processed,
sometimes 40,000.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Here's the code:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>'********************************************************************************</FONT></DIV>
<DIV><FONT face=Arial size=2>Set rstTaxRate = db.OpenRecordset("Select * FROM
tblTaxRates")<BR>Set rstRecoveryTable = db.OpenRecordset("Select * FROM
tblPrintRecoveryForm")</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>With rstRecoveryTable</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>If .BOF = True And .EOF = True Then GoTo
GoodBye:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>.MoveLast<BR>txtTotalRecords =
.RecordCount<BR>.MoveFirst<BR>lngCount = 0</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Do While Not .EOF</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> lngCount = lngCount +
1<BR> If lngCount Mod 1000 = 0
Then<BR> txtRecordNumber =
lngCount<BR>
Me.Repaint<BR> End If<BR>
<BR> .Edit</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> If
Nz(!fldInvoiceDetailPriceShouldBe) = 0
Then<BR> !PriceError =
0<BR> !TotalDue =
0<BR> End If<BR> <BR> If
Nz(!fldInvoiceDetailPricePaid) < 0
Then<BR> !PriceError =
!fldInvoiceDetailPricePaid<BR>
!TotalDue = !PriceError * !fldInvoiceDetailQuantity<BR> End
If<BR> <BR> If !fldInvoiceDetailSalesTax =
"Y" Then<BR>
<BR> ' find tax rate for this
invoice date; if not found, tax is
zero<BR> rstTaxRate.FindFirst
"fldTaxRateStartDate <= #" & !fldInvoiceDate
_<BR> &
"# AND fldTaxRateEndDate >= #" & !fldInvoiceDate &
"#"<BR>
<BR> If rstTaxRate.NoMatch = False
Then<BR>
!SalesTax = !PriceError *
rstTaxRate!fldTaxRate<BR>
!TotalDue = (!PriceError + !SalesTax) *
!fldInvoiceDetailQuantity<BR> End
If<BR> <BR> End
If<BR> <BR> .Update<BR>
<BR> .MoveNext<BR>Loop</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>End
With<BR>'*************************************************************************</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any hints?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>MTIA,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Rocky Smolin<BR>Beach Access
Software</FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT>
<DIV><FONT face=Arial size=2> </DIV></BLOCKQUOTE></FONT></BODY></HTML>