diff options
author | Eugeniy Mikhailov <evgmik@gmail.com> | 2010-12-18 20:27:23 -0500 |
---|---|---|
committer | Eugeniy Mikhailov <evgmik@gmail.com> | 2010-12-18 20:27:23 -0500 |
commit | a008bb25da7f9be158f00ee070fe269a275c999f (patch) | |
tree | 5e4364fc4f6ea8e9738cac929d59ce1b899362fa /GradeBook.tcl | |
parent | dad8d7a9e3f54be1e79d6f2af1670789e7356cd0 (diff) | |
download | GradeBook-a008bb25da7f9be158f00ee070fe269a275c999f.tar.gz GradeBook-a008bb25da7f9be158f00ee070fe269a275c999f.zip |
error check added
darcs-hash:20101219012723-067c0-1d9d5d64e6085c5a450b9100cf4cddd03372bb17.gz
Diffstat (limited to 'GradeBook.tcl')
-rwxr-xr-x | GradeBook.tcl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/GradeBook.tcl b/GradeBook.tcl index 3ecfb42..4bc6eef 100755 --- a/GradeBook.tcl +++ b/GradeBook.tcl @@ -282,8 +282,14 @@ proc UpdateGrades { permission_list user } { set eval_str "SELECT UserName FROM GradesTable" set err [catch { db eval $eval_str v { - set sql_str [concat UPDATE GradesTable SET \"$columnname\"=\"$colval($v(UserName))\" where UserName=\"$v(UserName)\"] - db eval $sql_str + set sql_str [concat UPDATE GradesTable SET \"$columnname\"=\'$colval($v(UserName))\' where UserName=\"$v(UserName)\"] + set err2 [catch { + db eval $sql_str + } errStat2 ] + if { $err2 } { + puts "the following error happen: $errStat2" + dbg "the following error happen: $errStat2" 3 + } } } errStat ] |