Error Message
When using ArcPy to execute the Truncate Table tool, the following error message is returned:
Error:
ERROR 000187: Only supports Geodatabase tables and feature classes
Failed to execute (TruncateTable).
Cause
Although the error indicates it is related to the geodatabase table or feature class, the error can also be caused by other issues.
Path to the input is incorrect or does not exist
Error 000187 is returned if the path to the input geodatabase table or feature class is incorrectly entered or does not exist within the machine where the tool is being run.
Permission to the input is not set
Error 000187 is returned if the user does not have the proper credentials to access the input geodatabase table or feature class. This could be a result of a change in the password or the user credentials in the connection file to the geodatabase table or feature class.
A connection cannot be made
Error 000187 is returned if the user is unable to connect to the geodatabase table or feature class. This could be a result of not having the database connection file to the geodatabase where the table or feature class is stored, or the machine is incapable of making a connection to the input geodatabase table or feature class because it does not have an SQL server client installed.
Solution or Workaround
Before running the Truncate Table tool in ArcPy, ensure the following:
- The path is pointing to an existing feature class or geodatabase table.
- The user has the right permission to access the path referenced in the Truncate Table tool.
- The machine is capable of making a connection to the input geodatabase table or feature class.