3系とはだいぶ違うので個人的メモ
orasql $ora "SELECT PARTS_CLASS, PARTS_CODE, NAME FROM PARTS
WHERE NAME LIKE '%テイコウ%'"
if {$oramsg(rc) != 0} {
tk_messageBox -message "Ootto! $oramsg(rc) : $oramsg(errortxt)"
} else {
set result {}
orafetch $ora { lappend result "@1-@2\t@3" }
tk_messageBox -title "Result" -message [join $result "\n"]
}
で処理できていたのか・・・・・
orasql $ora "SELECT PARTS_CLASS, PARTS_CODE, NAME FROM PARTS
WHERE NAME LIKE '%テイコウ%'"
if {$oramsg(rc) != 0} {
tk_messageBox -message "Ootto! $oramsg(rc) : $oramsg(errortxt)"
} else {
set result {}
orafetch $ora -datavariable row -command { lappend result "[lindex $row 0]-[lindex $row 1]\t[lindex $row 2]" }
tk_messageBox -title "Result" -message [join $result "\n"]
}
又は
orasql $ora "SELECT PARTS_CLASS, PARTS_CODE, NAME FROM PARTS
WHERE NAME LIKE '%テイコウ%'"
if {$oramsg(rc) != 0} {
tk_messageBox -message "Ootto! $oramsg(rc) : $oramsg(errortxt)"
} else {
set result {}
orafetch $ora -dataarray row -command { lappend result "$row(0)-$row(1)\t$row (2)" }
tk_messageBox -title "Result" -message [join $result "\n"]
}
に成る・・・