Good morning,
We have several Python scripts that count records in sde views and were working fine before version 3,6. But now they return an error message: ERROR 160077: An underlying database error occurred.
Our sde views are located in a SQL server database.
import arcpy
# Replace with your SDE view path or layer name
sde_view = r"Database Connections\MySDEConnection.sde\MySchema.MyView"
# Run Get Count
count = arcpy.management.GetCount(sde_view)
# Output the count
print("Total records:", int(count[0]))