Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access database locking 1

Status
Not open for further replies.

davejoyce

Programmer
Jun 26, 2000
29
US
After many of my queries my access database continues to be locked(.ldb file exists). This stops me from updating the table definitions and deleting data during testing. There must be a timeout that occurs and releases the lock file after some period of time. Is there something that needs to be done to close the database??<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;Thanks,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dave Joyce
 
Dave,<br><br>Are these queries that are manually executed via users or queries that are called from reports, forms, or macros?<br><br>Programmher
 
they are called from reports. See following for example:<br><br>&lt;CFPARAM name=&quot;szDate&quot; default=#DateFormat(Now(), &quot;mm/dd/yy&quot;)#&gt;<br><br>&lt;cfoutput&gt;<br><br>&lt;CFQUERY NAME=&quot;GetStatusData&quot; DATASOURCE=&quot;Sites&quot;&gt;<br> (SELECT&nbsp;&nbsp;plant, status, status_date, N1, Start_Date,<br> &nbsp;&nbsp;&nbsp;&nbsp;(Select count(*) FROM punch_list_tbl<br>&nbsp; WHERE resp_person = 'test_person' <br> AND status = 'Open'<br> AND plant = checklist_tbl.plant) as test_open, <br> (Select count(*) FROM punch_list_tbl<br> WHERE resp_person = 'developer' <br> AND status = 'Open'<br> AND plant = checklist_tbl.plant) as devel_open <br> FROM&nbsp;&nbsp;checklist_tbl<br> where N1 &lt;&gt; 'C' <br> ORDER by Start_Date, plant)<br>&lt;/cfquery&gt;<br><br>&lt;html&gt;<br>&lt;head&gt;<br> &lt;title&gt;Untitled&lt;/title&gt;<br>&lt;/head&gt;<br><br>&lt;body&gt;<br><br>&lt;cfloop query=GetStatusData&gt;<br>&lt;CFSET nWeek = #DateDiff(&quot;WW&quot;, Start_Date, Now())# + 1&gt;<br>&lt;CFQUERY DATASOURCE=&quot;GeneralArchive&quot;&gt;<br>INSERT INTO StatusSnapshot_tbl (SnapshotDate, Plant, nweek, testopen, developen, status, statusdate)<br> Values ('#szDate#', '#Plant#', '#nWeek#', '#test_open#', '#devel_Open#', '#Status#', '#Status_Date#') <br>&lt;/cfquery&gt;<br>&lt;/cfloop&gt;<br><br><br>&lt;CFOUTPUT&gt;<br>&lt;b&gt;Snapshot complete&lt;/b&gt;<br>&lt;/cfoutput&gt;<br>&lt;BR&gt;<br>&lt;br&gt;<br>&lt;br&gt;<br>&lt;CENTER&gt;&lt;A HREF=&quot;new_checklist_home.cfm&quot;&gt;&lt;B&gt;&lt;Font color=&quot;RED&quot;&gt;Back To Menu&lt;/font&gt;&lt;/b&gt;&lt;/A&gt;&lt;/center&gt;<br><br>&lt;/body&gt;<br>&lt;/html&gt;<br>
 
Still having same problem <p>Dave Joyce<br><a href=mailto:DaveJoyce@hotmail.com>DaveJoyce@hotmail.com</a><br><a href= > </a><br>
 
Dave,<br><br>I've found that if you create a file (I call it &quot;breaklock.cfm) which tries to access a table which doesn't exist in the datasource, this releases the lock (and gets rid of the .ldb file).<br><br>Try it....it works!! <p>Peter Toby<br><a href=mailto:webmaster@petertoby.com.au>webmaster@petertoby.com.au</a><br><a href= site is under construction but getting better!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top