title: Python DBF. Add record to dbf table with fpt memo field
body: <p>I am trying to add a record to an existing and empty DBF table (Fox Pro) that has an index file and a memo file. It already exists in my folder:</p>
  
  <pre><code>Table.dbf
  Table.fpt
  Table.cdx
  </code></pre>
  
  <p>Table.dbf has three fields:</p>
  
  <pre><code>Field1 (Integer)
  Field2 (Character)
  Field3 (Memo)
  </code></pre>
  
  <p>I use the method as described in</p>
  
  <p><a href="http://Http://stackoverflow.com/questions/16682470/using-python-to-write-dbf-table-with-fpt-memos?rq=1" rel="nofollow noreferrer">http://stackoverflow.com/questions/37891686/how-to-add-a-field-to-a-dbf-file</a></p>
  
  <p>It is as follows:</p>
  
  <pre><code>import dbf
  
  db = dbf.Table('table.dbf')
  db.open() 
  rec = dbf.create_template(db) 
  rec.field1 = 9 
  rec.field2 = ('some text')
  db.append(rec)
  </code></pre>
  
  <p>So far so good. The problem is when a field is of type memo</p>
  
  <pre><code>Db = dbf.Table ('table.dbf')
  Db.open ()
  Rec = dbf.create_template (db)
  Rec.field1 = 9
  Rec.field2 = ('some text')
  Rec.field3 = ('This is a long text')
  Db.append (rec)
  </code></pre>
  
  <p>Then I have an error message:</p>
  
  <pre><code>Traceback (most recent call last):
     File "dbf12.py", line 8, in &lt;module&gt;
       Rec.field3= ('This is a long text')
     File "...libsite-packages\dbf\ver_33.py", line 2959, in __setattr__
       Self._dirty = True
     File "...libsite-packages\dbf\ver_33.py", line 2956, in __setattr__
       Raise FieldMissingError (name)
  Dbf.ver_33.FieldMissingError: '_dirty: no such field in table'
  </code></pre>
  
  <p>I have looked at a similar question in</p>
  
  <p><a href="http://Http://stackoverflow.com/questions/16682470/using-python-to-write-dbf-table-with-fpt-memos?rq=1" rel="nofollow noreferrer">Http://stackoverflow.com/questions/16682470/using-python-to-write-dbf-table-with-fpt-memos?rq=1</a></p>
  
  <p>I tried to change:</p>
  
  <pre><code>Db = dbf.Table ('table.dbf', dbf_type = 'Vfp')
  </code></pre>
  
  <p>But the result is the same.</p>
  
  <p>Does anyone know the correct way to enter the memo field?</p>
  
  <p>Thanks.</p>