<?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: arcpy.SearchCursor and a query Layer in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-searchcursor-and-a-query-layer/m-p/371936#M29398</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;arcpy.da.SearchCursor (&lt;STRONG&gt;not same as arcpy.SearchCursor&lt;/STRONG&gt;) &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//018w00000011000000" title="http://resources.arcgis.com/en/help/main/10.1/index.html#//018w00000011000000"&gt;ArcGIS Help 10.1&lt;/A&gt;‌, Input does't have to be a feature class or table, it can be a layer or table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Aug 2014 14:21:59 GMT</pubDate>
    <dc:creator>RiyasDeen</dc:creator>
    <dc:date>2014-08-13T14:21:59Z</dc:date>
    <item>
      <title>arcpy.SearchCursor and a query Layer</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-searchcursor-and-a-query-layer/m-p/371935#M29397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have developed that a python script that will allow us to search a FGDb however once we put it onto the server and use it against a Query Feature Class (a view containing a query from several tables) then it fails as it doesnt like the data source.&lt;/P&gt;&lt;P&gt;When we hard coded the connection path it states that the expression is empty!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the code below, any ideas on a SearchCursor within arcpy that can search a query layer?? Like I said, we know the code works it's just this one thing that is failing on the new environment&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cursor = arcpy.SearchCursor(fieldsLyr.dataSource, where_clause=ddp_field + " = '" + busid + "'", fields="MIA_BY_CATEGORY")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Any help is always appreciated,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2014 13:35:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-searchcursor-and-a-query-layer/m-p/371935#M29397</guid>
      <dc:creator>JohnByrne</dc:creator>
      <dc:date>2014-08-13T13:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.SearchCursor and a query Layer</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-searchcursor-and-a-query-layer/m-p/371936#M29398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;arcpy.da.SearchCursor (&lt;STRONG&gt;not same as arcpy.SearchCursor&lt;/STRONG&gt;) &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//018w00000011000000" title="http://resources.arcgis.com/en/help/main/10.1/index.html#//018w00000011000000"&gt;ArcGIS Help 10.1&lt;/A&gt;‌, Input does't have to be a feature class or table, it can be a layer or table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2014 14:21:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-searchcursor-and-a-query-layer/m-p/371936#M29398</guid>
      <dc:creator>RiyasDeen</dc:creator>
      <dc:date>2014-08-13T14:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.SearchCursor and a query Layer</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-searchcursor-and-a-query-layer/m-p/371937#M29399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John, the preferred is no the da.SearchCursor, but that is probably not the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you add a bit more information for us to look at.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;SearchCursor (dataset, {where_clause}, {spatial_reference}, {fields}, {sort_fields})&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you provide the dataset parameter:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fieldsLry came from where, and did you provide yourself access to the objects.datasource attribute?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, when you have parameters that are not being filled out, just helpful to place ""&amp;nbsp; for empty. Just a practice I do, just to make sure. Particularly with the old SearchCursor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2014 14:16:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-searchcursor-and-a-query-layer/m-p/371937#M29399</guid>
      <dc:creator>ToddUlery</dc:creator>
      <dc:date>2014-08-14T14:16:21Z</dc:date>
    </item>
  </channel>
</rss>

