注册 登录
编程论坛 PowerBuilder

急: EXECUTE IMMEDIATE ls_sql的问题

freele_china 发布于 2008-01-10 17:03, 4283 次点击
高手,帮帮忙吧.

        ls_SqlTxt        =  ' INSERT INTO TQ15T     ' &
                                    +  ' (    prodgb            ,        ' &     
                                    +  '    pwono            ,        ' &     
                                    +  '    prodat            ,        ' &     
                                    +  '    goodcd            ,           ' &
                                    +  '    macncd            ,           ' &                         
                                    +  '    lncd                ,        ' &
                                    +  '    prochs            ,        ' &         
                                    +  '    toqty                ,           ' &
                                    +  '    inqty                ,        ' &
                                    +  '    asqty                ,        ' &
                                    +  '    wesqty            ,        ' &
                                    +  '    basqty            ,        ' &
                                    +  '    okqty                ,        ' &
                                    +  '    decd                ,        ' &
                                    +  '    examno            ,        ' &                             
                                    +  '    strtim                ,        ' &                             
                                    +  '    endtim            ,        ' &                             
                                    +  '    repscd            ,        ' &
                                    +  '    regdat            ,        ' &                             
                                    +  '    restat                )        ' &
                                    +  ' VALUES( "A"        ,        ' &                             
                                    +  '    "' +   ls_wono                                        + '" ,   ' &
                                    +  '    "' +   STRING(ld_prodat, 'MM-DD-YYYY')         + '" ,   ' &
                                    +  '    "' +   ls_goodcd                                        + '" ,   ' &
                                    +  '    "' +   ls_macncd                                    + '" ,   ' &                         
                                    +  '    "' +   ls_lncd                                            + '" ,   ' &
                                    +  '    "' +  '1'                                                + '" ,   ' &     
                                    +  '    "' +  STRING(le_inqty)                            + '" ,   ' &
                                    +  '    "' +  STRING(le_inqty)                            + '" ,   ' &
                                    +  '    "' +  STRING(le_asqty)                            + '" ,   ' &
                                    +  '    "' +  STRING(le_wesqty)                            + '" ,   ' &
                                    +  '    "' +  STRING(le_basqty)                            + '" ,   ' &
                                    +  '    "' +  STRING(le_okqty)                            + '" ,   ' &
                                    +  '    "' +  ls_decd                                            + '" ,   ' &
                                    +  '     "' +  ls_examno                                        + '" ,   ' &
                                    +  '    TO_DATE( "' + STRING(ld_strtim, 'MM-DD-YYYY HH:MM:SS') + '" , "%m-%d-%Y %H:%M:%S" )  , '  &
                                    +  '    TO_DATE( "' + STRING(ld_endtim, 'MM-DD-YYYY HH:MM:SS') + '" , "%m-%d-%Y %H:%M:%S" ) , '  &
                                    +  '     "' +    str_glb.gs_pscd                                + '" ,   ' &                             
                                    +  '    current                                                         ,   ' &                             
                                    +    '    "9"                                                               )     ' &
                            
    

[bold]EXECUTE IMMEDIATE ls_sql ;
在PB中运行后,能进行ROllback吗[/bold]


[[italic] 本帖最后由 freele_china 于 2008-1-10 17:04 编辑 [/italic]]
9 回复
#2
freele_china2008-01-11 12:12
真有那么难吗
#3
freele_china2008-01-11 16:56
人烟稀少呀,连个回复的人都没有.路过的人越来越少
#4
freele_china2008-01-14 08:24
就还是把它顶起来,让更多的高手看看
#5
XieLi2008-01-14 11:21
可以的吧
ROLLBACK USING SQLCA;
#6
zhouyun02008-01-28 11:40
排版好一点再给我们看啦!
#7
freele_china2008-03-04 16:54
?????!
#8
ugly9278462008-03-31 16:02
oracle据说要遇到commit的时候才提交的,你在执行之后用rollback using sqlca试下  .
#9
freele_china2008-04-01 09:16
谢谢大家,

Rollback;
与Commit, 再动态SQL中同样适用
#10
ugly9278462008-04-02 09:31
问题解决就好
1