<?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: dbf file and SearchCursor in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/dbf-file-and-searchcursor/m-p/34451#M1217</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for that - I gave it a try but it's definately the SearchCursor row that is throwing the error. When I step through the code it doesn't even get past this line.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get the following error in Wing after that line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;RuntimeError: ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The Field type is invalid or unsupported for the operation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The Field type is invalid or unsupported for the operation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "k:\PythonScripts\PythonScripts92\AppendGeoInventSDE92.py", line 66, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; rows = arcpy.SearchCursor(GEOINVENT_dbf)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\__init__.py", line 804, in SearchCursor&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; return gp.searchCursor(*args)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 357, in searchCursor&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; self._gp.SearchCursor(*gp_fixargs(args)))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have any other ideas?&amp;nbsp; I might just transfer my table to a geodatabase - might be the easiest fix but I'd like to find out what is going on here.&amp;nbsp; It's really pretty annoying!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Sep 2010 19:23:25 GMT</pubDate>
    <dc:creator>MicheleH_DNReply</dc:creator>
    <dc:date>2010-09-09T19:23:25Z</dc:date>
    <item>
      <title>dbf file and SearchCursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/dbf-file-and-searchcursor/m-p/34449#M1215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a process that compares a feature class in SDE to records in a database and if there are any records in the database that do not appear in the feature class these are written out to a dbf file. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I then check if there are any rows in the dbf file and if there are create points for these and append them to the feature class in SDE.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use a search cursor in a python script to check if there are any rows in the dbf file.&amp;nbsp; This worked fine with ArcGIS 9.3.1 but now with 10.0 it's acting like it doesn't know the dbf is there.&amp;nbsp; If I export it to a feature dataset it works as well but I really don't want to have to do that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know why this is happening or if there is a better way to do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my code at the moment:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;GEOINVENT_dbf = "\\\\whk2k3sql02\\SDE_DataAdmin\\Transfer\\Import\\Table\\GEOTHERM.dbf"
try:
&amp;nbsp; print '==== Checking for empty DBF'
&amp;nbsp; rows = arcpy.SearchCursor(GEOINVENT_dbf)
&amp;nbsp; row = rows.next()
&amp;nbsp; if row:
&amp;nbsp;&amp;nbsp;&amp;nbsp; AppendAll()
&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "No rows in DBF"
except:
&amp;nbsp; arcpy.getmessages()


print '*****ALL DONE'&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've also tried the new fangled way of doing it and it doesn't work either - but not sure if I have it right:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;GEOINVENT_dbf = "\\\\whk2k3sql02\\SDE_DataAdmin\\Transfer\\Import\\Table\\GEOTHERM.dbf"
try:
&amp;nbsp; print '==== Checking for empty DBF'
&amp;nbsp; for row in arcpy.SearchCursor(GEOINVENT_dbf):
&amp;nbsp;&amp;nbsp;&amp;nbsp; if row:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AppendAll()
&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "No rows in DBF"
except:
&amp;nbsp; arcpy.getmessages()
 
print '*****ALL DONE'&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Michele.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2010 04:05:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/dbf-file-and-searchcursor/m-p/34449#M1215</guid>
      <dc:creator>MicheleH_DNReply</dc:creator>
      <dc:date>2010-09-09T04:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: dbf file and SearchCursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/dbf-file-and-searchcursor/m-p/34450#M1216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Michele,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think it is just the &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;if row&lt;/PRE&gt;&lt;SPAN&gt; that is not working as expected&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd suggest you try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
GEOINVENT_dbf = "\\\\whk2k3sql02\\SDE_DataAdmin\\Transfer\\Import\\Table\\GEOTHERM.dbf"
rows,row = None,None
try:
&amp;nbsp; print '==== Checking for empty DBF'
&amp;nbsp; rows = arcpy.SearchCursor(GEOINVENT_dbf)
&amp;nbsp; row = rows.next()
&amp;nbsp; if row &amp;lt;&amp;gt; None:
&amp;nbsp;&amp;nbsp;&amp;nbsp; AppendAll()
&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "No rows in DBF"
except:
&amp;nbsp; arcpy.getmessages()

del rows,row
print '*****ALL DONE'
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:20:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/dbf-file-and-searchcursor/m-p/34450#M1216</guid>
      <dc:creator>GünterDörffel</dc:creator>
      <dc:date>2021-12-10T21:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: dbf file and SearchCursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/dbf-file-and-searchcursor/m-p/34451#M1217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for that - I gave it a try but it's definately the SearchCursor row that is throwing the error. When I step through the code it doesn't even get past this line.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get the following error in Wing after that line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;RuntimeError: ERROR 999999: Error executing function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The Field type is invalid or unsupported for the operation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The Field type is invalid or unsupported for the operation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "k:\PythonScripts\PythonScripts92\AppendGeoInventSDE92.py", line 66, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; rows = arcpy.SearchCursor(GEOINVENT_dbf)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\__init__.py", line 804, in SearchCursor&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; return gp.searchCursor(*args)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 357, in searchCursor&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; self._gp.SearchCursor(*gp_fixargs(args)))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have any other ideas?&amp;nbsp; I might just transfer my table to a geodatabase - might be the easiest fix but I'd like to find out what is going on here.&amp;nbsp; It's really pretty annoying!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Sep 2010 19:23:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/dbf-file-and-searchcursor/m-p/34451#M1217</guid>
      <dc:creator>MicheleH_DNReply</dc:creator>
      <dc:date>2010-09-09T19:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: dbf file and SearchCursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/dbf-file-and-searchcursor/m-p/34452#M1218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Michele,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I had tried with "any" dbf file ... and it worked ... so the only thing I can assume is that your GEOTHERM dbf has some "issue" - so yes, loading it into a Geodatabase (just for a try) might be worth the effort&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Sep 2010 04:28:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/dbf-file-and-searchcursor/m-p/34452#M1218</guid>
      <dc:creator>GünterDörffel</dc:creator>
      <dc:date>2010-09-10T04:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: dbf file and SearchCursor</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/dbf-file-and-searchcursor/m-p/34453#M1219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yip - I believe you are right - a problem with my dbf file.&amp;nbsp; Thanks for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Sep 2010 19:11:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/dbf-file-and-searchcursor/m-p/34453#M1219</guid>
      <dc:creator>MicheleH_DNReply</dc:creator>
      <dc:date>2010-09-12T19:11:40Z</dc:date>
    </item>
  </channel>
</rss>

