<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CreateDatabaseConnection_management doesn't return an error for no-existing user in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/createdatabaseconnection-management-doesn-t-return/m-p/587467#M46060</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You've found a good workaround yourself. Creating a connection file is wholly independent from connecting to the database and you can't really test the connection until you create the connection file.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Jul 2013 14:35:27 GMT</pubDate>
    <dc:creator>MathewCoyle</dc:creator>
    <dc:date>2013-07-23T14:35:27Z</dc:date>
    <item>
      <title>CreateDatabaseConnection_management doesn't return an error for no-existing user</title>
      <link>https://community.esri.com/t5/python-questions/createdatabaseconnection-management-doesn-t-return/m-p/587465#M46058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've tested the "arcpy.CreateDatabaseConnection_management" and I found out that, unlike the manual process, it's possible to create a connection file from invalid user's login without receiving any alert message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;try:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CreateDatabaseConnection_management(my valid parameters, non-existing user)
except Exception as (e):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The connection file is created anyway.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Should it be possible to had a new parameter to the method in order to check if the connection&amp;nbsp; works ? (like the "validate" parameter of the MapDocument "findAndReplaceWorkspacePaths" method ) ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For now I fixed it by using "arcpy.ListUsers(myConnection)" to test the connection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a better way of doing it ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 15:50:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/createdatabaseconnection-management-doesn-t-return/m-p/587465#M46058</guid>
      <dc:creator>SchoppMatthieu</dc:creator>
      <dc:date>2013-07-22T15:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: CreateDatabaseConnection_management doesn't return an error for no-existing user</title>
      <link>https://community.esri.com/t5/python-questions/createdatabaseconnection-management-doesn-t-return/m-p/587466#M46059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Same thing for "CreateGISServerConnectionFile" &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 16:19:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/createdatabaseconnection-management-doesn-t-return/m-p/587466#M46059</guid>
      <dc:creator>SchoppMatthieu</dc:creator>
      <dc:date>2013-07-22T16:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: CreateDatabaseConnection_management doesn't return an error for no-existing user</title>
      <link>https://community.esri.com/t5/python-questions/createdatabaseconnection-management-doesn-t-return/m-p/587467#M46060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You've found a good workaround yourself. Creating a connection file is wholly independent from connecting to the database and you can't really test the connection until you create the connection file.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2013 14:35:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/createdatabaseconnection-management-doesn-t-return/m-p/587467#M46060</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-07-23T14:35:27Z</dc:date>
    </item>
  </channel>
</rss>

