Hi all, So, today while trying to add coded value to domain to a File GDB (arcobjects 9.3) I kept getting "ERROR 000464: Cannot get exclusive schema lock". After some research, many reported this same problem w/ 9.3 and File GDB, so I decided to take the 'plunge' and install ArcGIS 10 that had been on my desk for a month now. Long story short, looks like the schema lock 'bugs' with File GDB's didn't get corrected in ArcGIS 10...All instances of ArcCat/ArcMap are closed. I can add feat. class to this same feat. dataset without any probs; or schema lock errors, but when trying to add coded value to EXISTING domain; schema lock errors occur. Here is the script:# Import system modules
import arcpy
arcpy.env.workspace = r"G:\\63D RRC GIS Data\\63D_RSC_GDB"
pathwrksp = arcpy.env.workspace
#print pathwrksp
path2wrksps = arcpy.ListWorkspaces("AR001*")
for path2wrksp in path2wrksps:
#print "... " + path2wrksp
arcpy.env.workspace = path2wrksp
wrksps3 = arcpy.ListWorkspaces("*","FileGDB")
for wrksp3 in wrksps3:
arcpy.env.workspace = wrksp3
print "...... " + arcpy.workspace
listDomains = arcpy.Describe(wrksp3).Domains
for domain in listDomains:
try:
arcpy.env.workspace = domain
#print domain
if domain == "d_boolen":
arcpy.AddCodedValueToDomain_management(wrksp3,"d_boolen", "N", "No.")
arcpy.AddCodedValueToDomain_management(wrksp3,"d_boolen", "Y", "Yes.")
print "d_boolen fixed"
except:
print arcpy.GetMessages()
Here is the error:Executing: AddCodedValueToDomain "G:\\63D RRC GIS Data\\63D_RSC_GDB\AR001_Arkadelphia\AR001_Arkadelphia.gdb" d_boolen N No.
Start Time: Wed Sep 01 14:40:10 2010
ERROR 000464: Cannot get exclusive schema lock. Either being edited or in use by another application.
The table was not found.
The index passed was not within the valid range.
Failed to execute (AddCodedValueToDomain).
Failed at Wed Sep 01 14:40:11 2010 (Elapsed Time: 1.00 seconds)