请问大家为什么这个报表脚本不能执行?

请问大家为什么下面报表脚本不能执行?用Msgbox oCom.CommandText显示不了,非常感谢!
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''插入一条生产数据 
    oCom.CommandText="INSERT INTO UA#Process(iPre0,iPre1,iPre2,iPre3,iPre4,iPre5,iPre6,iPre7,iPre8,iPre9,iPre10,iPre11,iPre12,iPre13,iPre14,iPre15,iPre16,iPre17,iPre18,iPre19,iPre20,"
       oCom.CommandText=oCom.CommandText & "iPre21,iPre22,iPre23,iPre24,iPre25,iPre26,iPre27,iPre28,iPre29,iPre30,iPre31,fPipe_CPS0,fPipe_CPS1,fPipe_CPS2,fPipe_CPS3,fPipe_CPS4,"
       oCom.CommandText=oCom.CommandText & "fPipe_CPS5,fPipe_CPS6,fPipe_CPS7,fPipe_CPS8,fPipe_CPS9,fPipe_CPS10,fPipe_CPS11,fPipe_CPS12,fPipe_CPS13,fPipe_CPS14,fPipe_CPS15,fPipe_CPS16,"
       oCom.CommandText=oCom.CommandText & "fPipe_CPS17,fPipe_CPS18,fPipe_CPS19,fPipe_CPS20,fPipe_CPS21,fPipe_CPS22,fPipe_CPS23,fPipe_CPS24,fPipe_CPS25,fPipe_CPS26,fPipe_CPS27,fPipe_CPS28,fPipe_CPS29,fPipe_CPS30,fPipe_CPS31)"
    oCom.CommandText=oCom.CommandText & "VALUES(" & iPre(0) & "," & iPre(1) & "," & iPre(2) & "," & iPre(3) & "," & iPre(4) & "," & iPre(5) & "," & iPre(6) & "," & iPre(7) & "," & iPre(8) & "," & iPre(9) & "," & iPre(10) & "," & iPre(11) & "," & iPre(12) & "," & iPre(13) & "," & iPre(14) & "," & iPre(15) & "," 
    oCom.CommandText=oCom.CommandText & iPre(16) & "," & iPre(17) & "," & iPre(18) & "," & iPre(19) & "," & iPre(20) &  "," & iPre(21) & "," & iPre(22) & "," & iPre(23) & "," & iPre(24) & "," & iPre(25) & "," & iPre(26) & "," & iPre(27) & "," & iPre(28) & "," & iPre(29) & "," & iPre(30) &"," & iPre(31) & "," 
    oCom.CommandText=oCom.CommandText & fPipe_CPS(0) & "," & fPipe_CPS(1) & "," & fPipe_CPS(2) & "," & fPipe_CPS(3) & "," & fPipe_CPS(4) & "," & fPipe_CPS(5) & "," & fPipe_CPS(6) & "," & fPipe_CPS(7) & "," & fPipe_CPS(8) & "," & fPipe_CPS(9) & "," & fPipe_CPS(10) & "," & fPipe_CPS(11) & "," & fPipe_CPS(12) & "," 
    oCom.CommandText=oCom.CommandText & fPipe_CPS(13) & "," & fPipe_CPS(14) & "," & fPipe_CPS(15) & "," & fPipe_CPS(16) & "," & fPipe_CPS(17) & "," & fPipe_CPS(18) & "," & fPipe_CPS(19) & "," & fPipe_CPS(20) & "," & fPipe_CPS(21) & "," & fPipe_CPS(22) & "," & fPipe_CPS(23) & "," & fPipe_CPS(24) & "," & fPipe_CPS(25) & "," 
    oCom.CommandText=oCom.CommandText & fPipe_CPS(26) & "," & fPipe_CPS(27) & "," & fPipe_CPS(28) & "," & fPipe_CPS(29) & "," & fPipe_CPS(30) & "," & fPipe_CPS(31) & ")"  
                Msgbox oCom.CommandText
    
    Set oRs = oCom.Execute

最佳答案

可以激活调试程序,当运行系统中脚本出现错误时自动激活调试程序

具体可参考:wincc帮助信息

使用wincc——用于用于创建过程和动作的 VBS——诊断

图片说明:

请问大家为什么这个报表脚本不能执行?  

提问者对于答案的评价:
非常感谢!

原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc320313.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2020年11月1日
下一篇 2020年11月1日

相关推荐