title: VFP erase command throwing error 1105
body: <p>I have a strange situation at a couple of sites where the innocuous line</p>
  
  <pre><code>ERASE (lcTablePath) RECYCLE
  </code></pre>
  
  <p>is throwing the error</p>
  
  <blockquote>
    <p>Error Number:  1105 - Error writing to file XXXXXXXXXXX</p>
  </blockquote>
  
  <p><code>lcTablePath</code> does have a value and it's pointing to a file that DOES exist across the network via a UNC path. I'm assuming it's a network issue, possibly with permissions.</p>
  
  <p>But why on earth "1105 - Error <strong>writing</strong> to file"?  I'm not WRITING to it at all.</p>
  
  <p>EDIT:  On further investigation, the issue is actually this</p>
  
  <p>FILE(XXX) says "true", ie the file does exist</p>
  
  <p>ERASE (XXX)</p>
  
  <p>OR</p>
  
  <p>lcTemp = FILETOSTR(XXX)</p>
  
  <p>fail, the FILETOSTR with "file not found".</p>
  
  <p>WTF?</p>