r = arcpy.CreateArcSDEConnectionFile_management("c:/temp","sde","ffoooo","411","SQLSERVER","DATABASE_AUTH","sde","*****","SAVE_USERNAME","#","SAVE_VERSION") msgIndex = 0 while msgIndex < r.messageCount: if r.GetSeverity(msgIndex) == 1: if '000565' in r.getMessage(msgIndex): print "cant connect" sys.exit() msgIndex +=1 # if you get this far, assumed connection is made...
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.