Menu

#68 oratcl4.5 array dml not support Oracle DML returning clause

open
nobody
None
5
2010-11-25
2010-11-25
No

#!/opt/tcl8.6/bin/tclsh8.6
# chapter 14
# arrayins.tcl
package require Oratcl
set lda [oralogon tmh/tmh2]
set stm [oraopen $lda]
puts [time {
set sql { \ insert into arraydml (v_number, v_char, v_varchar2) \ values (:vn, :vc, :v2) returning rowid into :ret
} oraparse $stm $sql
set vnl [list 10 11 12 13 14 15 16 17 18 19]
set vcl [list aa bb cc dd ee ff gg hh ii jj]
set v2l [list AA BB CC DD EE FF GG HH II JJ]
set vr [list {} {} {} {} {} {} {} {} {} {}]
orabind $stm -arraydml :vn $vnl :vc $vcl :v2 $v2l :ret vr
oraexec $stm
oracommit $lda
}]
puts $vr
oraclose $stm
oralogoff $lda
exit

Discussion


Log in to post a comment.