Posted to tcl by mjanssen at Thu Apr 26 21:05:48 GMT 2007view raw

  1. package require sqlite3
  2. sqlite3 db ivote.db
  3. proc test {} {
  4. after 1000 {set ::a 1}
  5. db eval {SELECT * FROM Choice} {
  6. voteControl
  7. vwait ::a
  8. }
  9. }
  10.  
  11. proc voteControl {} {
  12. db eval {UPDATE Choice SET for_talley = for_talley + 1}}
  13. test
  14. }
  15.  
  16. after 5000 exit
  17. test