<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Personal Geodatabase Lockfile Won't Go Away in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614417#M47950</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;del the whole pgdb and use a fgdb!:p&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jun 2012 19:10:39 GMT</pubDate>
    <dc:creator>KevinBell</dc:creator>
    <dc:date>2012-06-19T19:10:39Z</dc:date>
    <item>
      <title>Personal Geodatabase Lockfile Won't Go Away</title>
      <link>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614413#M47946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Environment: ArcEditor/ArcMap/Arc Catalog 10.0 with Python 2.6.5&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem: Running a script from ArcCatalog to populate an existing PGDB table from a CSV. The table gets filled perfectly but on completion of the script, the database lockfile(.ldb) doesn't disappear. Row and rows objects are both deleted in the script, so what is still holding the database? To clear the ldb, I have to close down ArcMap, then open the mdb in Access and then close it again. This defeats the whole object of convenience of staying in an ArcMap session to do a quick visual check of data just imported from CSV.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
import arcpy, csv

TypeOfData = str(arcpy.GetParameterAsText(0))
inputCSVfile = str(arcpy.GetParameterAsText(1))
FeatureClassTable = str(arcpy.GetParameterAsText(2))
row,rows = None,None

rows = arcpy.InsertCursor(FeatureClassTable)
fieldname = ["Last_Update","Last_Update_By","Feature_ID","Survey_ID","Survey_ID_Ref","Survey_Name","Feature_Name","Feature_Desc",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Symbology_Code","Symbology_Name","Line_ID","Line_Name","Easting","Northing","Depth","Altitude","Time_Stamp",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Heading","Remarks"]

inputTxtFile = open(inputCSVfile,"rb")
reader = csv.reader(inputTxtFile)
ID = 0

try:
&amp;nbsp; for inrow in inputTxtFile.readlines():
&amp;nbsp;&amp;nbsp;&amp;nbsp; if ID&amp;gt;0:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; itemstr = inrow.split(",")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x = itemstr[10]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = itemstr[11]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; z = itemstr[12]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m = 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; point = arcpy.Point(x,y,z,m,ID)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pnt = arcpy.PointGeometry(point)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row = rows.newRow()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue("Shape",pnt)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fieldname[0],itemstr[0])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fieldname[1],itemstr[1])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if itemstr[2]!='': row.setValue(fieldname[3],itemstr[2])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if itemstr[2]=='': row.setValue(fieldname[3],0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fieldname[4],itemstr[3])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fieldname[5],itemstr[4])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fieldname[6],itemstr[5])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fieldname[7],itemstr[6])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fieldname[8],itemstr[7])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fieldname[10],itemstr[8])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fieldname[11],itemstr[9])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fieldname[12],itemstr[10])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fieldname[13],itemstr[11])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fieldname[14],itemstr[12])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fieldname[15],itemstr[13])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fieldname[16],itemstr[14])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fieldname[17],itemstr[15])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(fieldname[18],itemstr[16])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.insertRow(row)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ID%500==0: arcpy.AddMessage(ID)
&amp;nbsp;&amp;nbsp;&amp;nbsp; ID += 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; if ID&amp;gt;100: break
&amp;nbsp; arcpy.AddMessage(ID-1)&amp;nbsp; 

except:
&amp;nbsp; if not arcpy.GetMessages() == "":
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage(arcpy.GetMessages(2))

finally:
&amp;nbsp; inputTxtFile.close()
&amp;nbsp; if row:
&amp;nbsp;&amp;nbsp;&amp;nbsp; del row
&amp;nbsp; if rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; del rows
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is really annoying, the same script runs in debug mode in PythonWin - as soon as I close PythonWin, the lockfile goes - without exiting my ArcMap session. But I don't want to use this method to run data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What do I need to do?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob Pearce&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 10:15:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614413#M47946</guid>
      <dc:creator>RobinPearce</dc:creator>
      <dc:date>2012-06-19T10:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Personal Geodatabase Lockfile Won't Go Away</title>
      <link>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614414#M47947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The does lock file actually stop you from doing anything? I know if FGDB lock files can persist after a session and have no impact on future sessions. I too have some lock files hanging around PGDBs after creation/processing and they don't seem impact on any analysis etc I want to do on them.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 13:09:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614414#M47947</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-06-19T13:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Personal Geodatabase Lockfile Won't Go Away</title>
      <link>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614415#M47948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'd try (if you haven't already), removing EACH variable from memory until the lock file (hopefully) disappears. I'd start with typing "del row" and "del rows" into the console. Those lines should error since it looks like they are being properly removed in the script. Keep removing variables (like "del pnt"). "dir()" will give you the full list of all variable in memory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if you find your culprit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Good Luck!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 16:51:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614415#M47948</guid>
      <dc:creator>JoshuaChisholm</dc:creator>
      <dc:date>2012-06-19T16:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Personal Geodatabase Lockfile Won't Go Away</title>
      <link>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614416#M47949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I'd try (if you haven't already), removing EACH variable from memory until the lock file (hopefully) disappears. I'd start with typing "del row" and "del rows" into the console. Those lines should error since it looks like they are being properly removed in the script. Keep removing variables (like "del pnt"). "dir()" will give you the full list of all variable in memory.&lt;BR /&gt;&lt;BR /&gt;Let me know if you find your culprit.&lt;BR /&gt;Good Luck!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try "del arcpy" too.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 18:18:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614416#M47949</guid>
      <dc:creator>ChrisBater</dc:creator>
      <dc:date>2012-06-19T18:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Personal Geodatabase Lockfile Won't Go Away</title>
      <link>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614417#M47950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;del the whole pgdb and use a fgdb!:p&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 19:10:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614417#M47950</guid>
      <dc:creator>KevinBell</dc:creator>
      <dc:date>2012-06-19T19:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Personal Geodatabase Lockfile Won't Go Away</title>
      <link>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614418#M47951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What would be the difference between the PGDB and the FGDB?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 19:22:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614418#M47951</guid>
      <dc:creator>nimitz</dc:creator>
      <dc:date>2012-06-19T19:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Personal Geodatabase Lockfile Won't Go Away</title>
      <link>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614419#M47952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;FGDB do not have a size limit. Support multi user viewing/editing. Topology, domains etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As of 10.0, there really is zero reason I know of to use a PGDB unless you need to tie it to Access for some archaic reason.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 19:29:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614419#M47952</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-06-19T19:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Personal Geodatabase Lockfile Won't Go Away</title>
      <link>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614420#M47953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To all who responded to my question - many thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regarding use of PGDB, this decision unfortunately is client-driven - perhaps later on we can move to FGDB. The limitations with Access structure are well known to our company. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The existence of the lockfile does stop us editing the PGDB in any way, most importantly via ArcMap data editing. So it's a nuisance. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Joshua C and Chris B - thanks for your suggestions - I will try that out and report back!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob P&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gardline Geosurvey&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gt Yarmouth&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Uk&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2012 08:23:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614420#M47953</guid>
      <dc:creator>RobinPearce</dc:creator>
      <dc:date>2012-06-20T08:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Personal Geodatabase Lockfile Won't Go Away</title>
      <link>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614421#M47954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, I just put in a 'del' statement for every variable and object name shown with dir(). Each delete seems to work ok. This just leaves the ones beginning with underscores plus 'pywin', which presumably only gets loaded with PythonWin anyway. Saved the script, ran directly. Still resolutely locked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know this must be possible because running the same script from the same Catalog window in ArcMap but using PythonWin via rightclick&amp;gt;debug, works.&amp;nbsp; By the way, this is all on my local C drive, so no other users or network complications involved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is PythonWin doing to release the PGDB, that the straight script isn't?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2012 14:54:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614421#M47954</guid>
      <dc:creator>RobinPearce</dc:creator>
      <dc:date>2012-06-20T14:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Personal Geodatabase Lockfile Won't Go Away</title>
      <link>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614422#M47955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Rob, weird error. I was trying to find something wrong with your script, but it looks solid. Just one side note that shouldn't be related to this problem. Should the line "if ID&amp;gt;100: break" be changed to "if ID&amp;gt;100: continue"?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As for the lock file, does it disappear when you "del pywin"?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2012 18:19:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614422#M47955</guid>
      <dc:creator>JoshuaChisholm</dc:creator>
      <dc:date>2012-06-20T18:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Personal Geodatabase Lockfile Won't Go Away</title>
      <link>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614423#M47956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've updated my 'finally' clause:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp; finally:
&amp;nbsp;&amp;nbsp;&amp;nbsp; inputTxtFile.close()
&amp;nbsp;&amp;nbsp;&amp;nbsp; del row
&amp;nbsp;&amp;nbsp;&amp;nbsp; del rows
&amp;nbsp;&amp;nbsp;&amp;nbsp; del FeatureClassTable
&amp;nbsp;&amp;nbsp;&amp;nbsp; del ID
&amp;nbsp;&amp;nbsp;&amp;nbsp; del TypeOfData
&amp;nbsp;&amp;nbsp;&amp;nbsp; del fieldname
&amp;nbsp;&amp;nbsp;&amp;nbsp; del inputCSVfile
&amp;nbsp;&amp;nbsp;&amp;nbsp; del inputTxtFile
&amp;nbsp;&amp;nbsp;&amp;nbsp; del inrow
&amp;nbsp;&amp;nbsp;&amp;nbsp; del itemstr
&amp;nbsp;&amp;nbsp;&amp;nbsp; del m
&amp;nbsp;&amp;nbsp;&amp;nbsp; del pnt
&amp;nbsp;&amp;nbsp;&amp;nbsp; del point
&amp;nbsp;&amp;nbsp;&amp;nbsp; del reader
&amp;nbsp;&amp;nbsp;&amp;nbsp; del x
&amp;nbsp;&amp;nbsp;&amp;nbsp; del y
&amp;nbsp;&amp;nbsp;&amp;nbsp; del z
&amp;nbsp;&amp;nbsp;&amp;nbsp; del csv
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RefreshCatalog("C:\GeneralWorkData\ArcGIS Test Data\OGP_BP\Python_work\BP8719_TestPop.mdb")
&amp;nbsp;&amp;nbsp;&amp;nbsp; del arcpy
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'pywin' is not included because I'm trying to run this outside PythonWin.&amp;nbsp; 'RefreshCatalog' is hardwired to my test PGDB after I stumbled over an old reference to this problem in an archived thread ("Python :: DeleteRows() and Release Object Reference", 9/27/04).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It don't work. I still have to crash out of Arcmap, then open the PGDB in Access then exit Access, to remove the lock. Surely there must be a way to do this properly! And I repeat, PythonWin manages to do it with Arcmap/Catalog still running.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ATTENTION ESRI:&amp;nbsp;&amp;nbsp; Are you still supporting PGDB file work?&amp;nbsp; If you are, please have someone come out, review this thread, and tell me EXACTLY what I need to know to resolve this lockfile problem. Our company has already spent weeks trying to migrate from VBA, which is no longer supported, to Python. Are we wasting our time trying to run a Python script from an ArcMap/Catalog window??&amp;nbsp; THANK YOU!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Those of you exhorting us to switch to FGDB - can you assure us we won't have lockfile problems with that system?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob Pearce&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(fed up with having to google every ESRI problem)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:16:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614423#M47956</guid>
      <dc:creator>RobinPearce</dc:creator>
      <dc:date>2021-12-12T02:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Personal Geodatabase Lockfile Won't Go Away</title>
      <link>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614424#M47957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Right - when I run my script and then add the data layer to the map window, I am able to close ArcGIS (saving the mxd), and my precious ldb lockfile disappears immediately. I don't have to open an Access session to clear it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does this ring any bells with anyone?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to contact the people who created PythonWin, in case they know what their software is doing. You never know, I might actually get an answer!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob P&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2012 09:01:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/personal-geodatabase-lockfile-won-t-go-away/m-p/614424#M47957</guid>
      <dc:creator>RobinPearce</dc:creator>
      <dc:date>2012-06-22T09:01:29Z</dc:date>
    </item>
  </channel>
</rss>

