title: Livecode Blob vs Text in sqlite
body: <p>I am currently storing five text fields in a table along with a number of numeric fields.</p>
  
  <p>I've now find that that these five text fields need to be encrypted.  If I encrypt each text field and then use <code>base64encode</code>, do I need to store the result in a BLOB or a TEXT field?</p>
  
  <p>At this time I have set up the table with five BLOB fields.  When I update one of the fields I use the following code;</p>
  
  <pre><code>put base64encode(tValue) into t64EncValue
  put "UPDATE myTable SET blobTextfield01 = :1 WHERE recID = :2" into tSQL
  revExecuteSQL gDatabaseID, tSQL, "*bt64EncValue", gCurrentID
  </code></pre>
  
  <p>When I read back the data (execute another SQL read) I can see that <code>t64EncValue</code> has some data but when I do a <code>base64Decode</code>, <code>tText01</code> is left blank.</p>
  
  <pre><code>put base64decode(t64EncValue) into tText01
  </code></pre>
  
  <p>I'm not sure if I have a problem with the way the data is saved, the way it's retrieved, or whether <code>base64decode</code> has an issue...</p>