sld474

SDE version editing with arcpy

Discussion created by sld474 on Dec 5, 2013
Latest reply on Dec 12, 2013 by sld474
Hi all,

I need to set up a way to edit a table and a feature class in versions of an SDE database.  The version is a parameter in a tool.  I must be missing a step, because I am not getting the Change Version function to work for any of my registered tables or the feature class.  Not even by converting the table to table view or the feature class to a feature layer.  The problem may be with the path.  Here is what I think should work:

out_gdb=r"T:\GIS\tools\SDE_Connection\CO_Stip_User.sde"

abstractTbl=os.path.join(out_gdb,"ilmco.ILMCODBO.Abstract")
arcpy.MakeTableView_management (plssTbl, "plss_2")
arcpy.ChangeVersion_management("plss_2", "TRANSACTIONAL", version_name)

minerals=os.path.join(out_gdb,"ilmco.ILMCODBO.Minerals")
arcpy.MakeFeatureLayer_management(minerals,"minerals_2")
arcpy.ChangeVersion_management("minerals_2", "TRANSACTIONAL", version_name)

The user versions are accessed through CO_Stip_User.sde.  The original database name is ilmco.  I've tried all sorts of combinations, but nothing is working!  Any ideas?

Thanks,
Sarah

Outcomes