Hi All,
I am playing around in python and am coming stuck with the arcpy.TruncateTable_management tool, as I can run it fine in the python window in Catalog, but when I run my py script it throws the below error:
Executing: TruncateTable "Database Connections\GISADMIN@SDE_Spatial@Smithy.sde\SDE_SPATIAL.GISADMIN.CAD_WSData_Sewer_DEV\Polygon_1"
Start Time: Wed Nov 19 16:07:29 2014
Failed to execute. Parameters are not valid.
ERROR 000187: Only supports Geodatabase tables and feature classes
Failed to execute (TruncateTable).
Failed at Wed Nov 19 16:07:29 2014 (Elapsed Time: 0.03 seconds)
When I run the below line in ArcCatalog it runs fine, no errors, and resultant table is empty as expected:
>>> import arcpy
>>> arcpy.TruncateTable_management(r'Database Connections\GISADMIN@SDE_Spatial@Smithy.sde\SDE_SPATIAL.GISADMIN.CAD_WSData_Sewer_DEV\SDE_SPATIAL.GISADMIN.Polygon1_1')
I find that the error information is not valid as it is able to successfully run within catalog, but not within a py script.
Anyone come across this before? Its rather frustrating.