title: Generate commands for SQL transaction with Tcl and sqlite
body: <p>I am having trouble understanding how to create a SQL command batch say in a list and pass it on to sqlite for execution in a transaction.</p>
  
  <p>Basically what I do now is:</p>
  
  <pre><code>sqlite3 db1 $dbFile
  db1 eval BEGIN
  foreach Key [array names myArray] {
      db1 eval {SQL statement involving $Key}
  }
  db1 eval COMMIT
  </code></pre>
  
  <p>I was thinking of a means to generate a list with SQL INSERTs and then passing it to <em>db1 transaction</em> or <em>db1 eval</em>, but this does not seem to work for me. Perhaps I am just making some stupin syntax mistakes. Anyone have a working example?</p>
  
  <p>Thanks!</p>