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...
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.