<?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 Need help to connect postgresql using ESRI.ArcGIS.Geodatabase.IWorkspaceFactory2.OpenFromString method in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/need-help-to-connect-postgresql-using-esri-arcgis/m-p/1104353#M7391</link>
    <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;I need a help to connect geodatabase using&amp;nbsp;ESRI.ArcGIS.Geodatabase.IWorkspaceFactory2.OpenFromString method&lt;/P&gt;&lt;P&gt;I coded like below (I have pasted only necessary part of code where i have issue)&lt;/P&gt;&lt;P&gt;I am getting below print statements from my Log file, after that not getting and DB connection also not established.&lt;/P&gt;&lt;P&gt;ErrorHandling.WriteStatusMessage("CommandManager_LoadSde", "Open SDE workspace");&lt;BR /&gt;ErrorHandling.WriteStatusMessage("Connection String", gConnectionString);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ESRI.ArcGIS.Geodatabase.IWorkspaceFactory2 pFact = null;&lt;BR /&gt;pFact = (ESRI.ArcGIS.Geodatabase.IWorkspaceFactory2)new ESRI.ArcGIS.DataSourcesGDB.SdeWorkspaceFactory();&lt;BR /&gt;ESRI.ArcGIS.Geodatabase.IWorkspace pWorkspace = null;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;String gConnectionString = "DBCLIENT=postgresql"&lt;BR /&gt;+ "SERVER=" + "&amp;lt;serverIP address&amp;gt;"&lt;BR /&gt;+ ";DATABASE=" + "&amp;lt;DBName&amp;gt;"&lt;BR /&gt;+ ";INSTANCE=" + "&amp;lt;port&amp;gt;"&lt;BR /&gt;+ ";USER=" + &amp;lt;user&amp;gt;&lt;BR /&gt;+ ";PASSWORD=" + &amp;lt;pwd&amp;gt;&lt;BR /&gt;+ ";VERSION=sde.DEFAULT";&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ErrorHandling.WriteStatusMessage("CommandManager_LoadSde", "Open SDE workspace");&lt;BR /&gt;ErrorHandling.WriteStatusMessage("Connection String", gConnectionString);&lt;/P&gt;&lt;P&gt;// PJD DEBUG:&lt;BR /&gt;//System.Windows.Forms.MessageBox.Show("gConnectionString is: " + gConnectionString);&lt;/P&gt;&lt;P&gt;pWorkspace = MemoryHelper.ReleaseAndCleanObject&amp;lt;ESRI.ArcGIS.Geodatabase.IWorkspace&amp;gt;(pWorkspace, pFact.OpenFromString(gConnectionString, 0));&lt;/P&gt;&lt;P&gt;System.Diagnostics.Debug.WriteLine("CommandManager_LoadSde", "Setting Workspace path=" + pWorkspace.PathName);&lt;/P&gt;&lt;P&gt;pPropertySet.SetProperty("WORKSPACE", pWorkspace);&lt;/P&gt;&lt;P&gt;//Set property and execute load sde command&lt;BR /&gt;clsLoadSdeSource pLoadSdeSource = MapTools.MapToolsFactory.Create&amp;lt;clsLoadSdeSource&amp;gt;(null, false);&lt;BR /&gt;pLoadSdeSource.LayerConfig = pPropertySet;&lt;BR /&gt;pLoadSdeSource.SdeWorkspace = pWorkspace;&lt;BR /&gt;ErrorHandling.WriteStatusMessage("CommandManager_LoadSde", "Call loadSdeSource.execute");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me to fix this issue.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 04 Oct 2021 10:58:09 GMT</pubDate>
    <dc:creator>VeeramaniB</dc:creator>
    <dc:date>2021-10-04T10:58:09Z</dc:date>
    <item>
      <title>Need help to connect postgresql using ESRI.ArcGIS.Geodatabase.IWorkspaceFactory2.OpenFromString method</title>
      <link>https://community.esri.com/t5/geodatabase-questions/need-help-to-connect-postgresql-using-esri-arcgis/m-p/1104353#M7391</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;I need a help to connect geodatabase using&amp;nbsp;ESRI.ArcGIS.Geodatabase.IWorkspaceFactory2.OpenFromString method&lt;/P&gt;&lt;P&gt;I coded like below (I have pasted only necessary part of code where i have issue)&lt;/P&gt;&lt;P&gt;I am getting below print statements from my Log file, after that not getting and DB connection also not established.&lt;/P&gt;&lt;P&gt;ErrorHandling.WriteStatusMessage("CommandManager_LoadSde", "Open SDE workspace");&lt;BR /&gt;ErrorHandling.WriteStatusMessage("Connection String", gConnectionString);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ESRI.ArcGIS.Geodatabase.IWorkspaceFactory2 pFact = null;&lt;BR /&gt;pFact = (ESRI.ArcGIS.Geodatabase.IWorkspaceFactory2)new ESRI.ArcGIS.DataSourcesGDB.SdeWorkspaceFactory();&lt;BR /&gt;ESRI.ArcGIS.Geodatabase.IWorkspace pWorkspace = null;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;String gConnectionString = "DBCLIENT=postgresql"&lt;BR /&gt;+ "SERVER=" + "&amp;lt;serverIP address&amp;gt;"&lt;BR /&gt;+ ";DATABASE=" + "&amp;lt;DBName&amp;gt;"&lt;BR /&gt;+ ";INSTANCE=" + "&amp;lt;port&amp;gt;"&lt;BR /&gt;+ ";USER=" + &amp;lt;user&amp;gt;&lt;BR /&gt;+ ";PASSWORD=" + &amp;lt;pwd&amp;gt;&lt;BR /&gt;+ ";VERSION=sde.DEFAULT";&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ErrorHandling.WriteStatusMessage("CommandManager_LoadSde", "Open SDE workspace");&lt;BR /&gt;ErrorHandling.WriteStatusMessage("Connection String", gConnectionString);&lt;/P&gt;&lt;P&gt;// PJD DEBUG:&lt;BR /&gt;//System.Windows.Forms.MessageBox.Show("gConnectionString is: " + gConnectionString);&lt;/P&gt;&lt;P&gt;pWorkspace = MemoryHelper.ReleaseAndCleanObject&amp;lt;ESRI.ArcGIS.Geodatabase.IWorkspace&amp;gt;(pWorkspace, pFact.OpenFromString(gConnectionString, 0));&lt;/P&gt;&lt;P&gt;System.Diagnostics.Debug.WriteLine("CommandManager_LoadSde", "Setting Workspace path=" + pWorkspace.PathName);&lt;/P&gt;&lt;P&gt;pPropertySet.SetProperty("WORKSPACE", pWorkspace);&lt;/P&gt;&lt;P&gt;//Set property and execute load sde command&lt;BR /&gt;clsLoadSdeSource pLoadSdeSource = MapTools.MapToolsFactory.Create&amp;lt;clsLoadSdeSource&amp;gt;(null, false);&lt;BR /&gt;pLoadSdeSource.LayerConfig = pPropertySet;&lt;BR /&gt;pLoadSdeSource.SdeWorkspace = pWorkspace;&lt;BR /&gt;ErrorHandling.WriteStatusMessage("CommandManager_LoadSde", "Call loadSdeSource.execute");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me to fix this issue.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 10:58:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/need-help-to-connect-postgresql-using-esri-arcgis/m-p/1104353#M7391</guid>
      <dc:creator>VeeramaniB</dc:creator>
      <dc:date>2021-10-04T10:58:09Z</dc:date>
    </item>
  </channel>
</rss>

