<?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 OLEDB Connection and Query questions in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/oledb-connection-and-query-questions/m-p/317669#M18220</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;System Information:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcGIS 10.2, Windows 7, SQL Server Express 2012.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcGIS 10.1 SP1, Windows Server 2008 R2 SP1, SQL Server Express 2012.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm looking for some assistance on creating an OleDB connection to SQL Server 2012 Express. I'm currently using the below connection string:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
return string.Format("Provider=ESRI.GeoDB.OleDB.1;Location={0};Data Source={4};Version={3};Extended
 Properties=workspacetype=esriDataSourcesGDB.SdeWorkspaceFactory.1;Instance=sde:sqlserver:{0};
Geometry=WKB", p_Server, p_Username, p_Password, p_Version, p_Database);
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Which when executed pops up a Database Connection dialog box with the Authentication Type of Database Authentication. I'm able to provide a user name and password and the connection then opens. However, I would like the connection to use Windows Authentication. Is it possible to alter the connection string such that it uses the Windows Authentication and avoids the Database Connection dialog?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Once connected I intended to use the connection in a READ ONLY format. Is it possible to run queries that contain table &lt;/SPAN&gt;&lt;SPAN style="font-family:Verdana;"&gt;aliases &lt;/SPAN&gt;&lt;SPAN&gt;and left outer join statements?&amp;nbsp; Currently when I use OleDbDataReader the query fails. Yet, the query is successful when executed in SQL Server Management Studio. When I make my connection I'm doing so from within ArcMap with an edit session started. So I don't believe I need to check out a license, correct?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've done extensive research but haven't yielded any recent results. Any assistance you might be able to provide would be greatly appreciated. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank You, G&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 15:06:20 GMT</pubDate>
    <dc:creator>GregRieck</dc:creator>
    <dc:date>2021-12-11T15:06:20Z</dc:date>
    <item>
      <title>OLEDB Connection and Query questions</title>
      <link>https://community.esri.com/t5/data-management-questions/oledb-connection-and-query-questions/m-p/317669#M18220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;System Information:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcGIS 10.2, Windows 7, SQL Server Express 2012.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcGIS 10.1 SP1, Windows Server 2008 R2 SP1, SQL Server Express 2012.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm looking for some assistance on creating an OleDB connection to SQL Server 2012 Express. I'm currently using the below connection string:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
return string.Format("Provider=ESRI.GeoDB.OleDB.1;Location={0};Data Source={4};Version={3};Extended
 Properties=workspacetype=esriDataSourcesGDB.SdeWorkspaceFactory.1;Instance=sde:sqlserver:{0};
Geometry=WKB", p_Server, p_Username, p_Password, p_Version, p_Database);
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Which when executed pops up a Database Connection dialog box with the Authentication Type of Database Authentication. I'm able to provide a user name and password and the connection then opens. However, I would like the connection to use Windows Authentication. Is it possible to alter the connection string such that it uses the Windows Authentication and avoids the Database Connection dialog?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Once connected I intended to use the connection in a READ ONLY format. Is it possible to run queries that contain table &lt;/SPAN&gt;&lt;SPAN style="font-family:Verdana;"&gt;aliases &lt;/SPAN&gt;&lt;SPAN&gt;and left outer join statements?&amp;nbsp; Currently when I use OleDbDataReader the query fails. Yet, the query is successful when executed in SQL Server Management Studio. When I make my connection I'm doing so from within ArcMap with an edit session started. So I don't believe I need to check out a license, correct?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've done extensive research but haven't yielded any recent results. Any assistance you might be able to provide would be greatly appreciated. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank You, G&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:06:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/oledb-connection-and-query-questions/m-p/317669#M18220</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2021-12-11T15:06:20Z</dc:date>
    </item>
  </channel>
</rss>

