Hi at all,
i have develop a python script that execute a query to table into sde connection (DB Oracle).
This my code:
import arcpy
from arcpy import env
env.workspace = ("Database Connections/TEST.sde")
sdeConn = arcpy.ArcSDESQLExecute("Database Connections/TEST.sde")
value = 'V'
sql = "select * from TEST.CATEGORIES WHERE TIP_SER = " + value
print(sql)
try:
sdeReturn = sdeConn.execute(sql)
print('ok')
except Exception, ErrorDesc:
print ErrorDesc
sdeReturn = False
But when i run i recive this error: RuntimeError: Object: Could not open SDE workspace
The sde connection works fine into ArcMap and also i have try other simple connection by arcpy for print a list table and works fine.
So why this error?
Any help?
Thanks