请教大家这个VB调试出错的原因?

以下是插入生产数据报表的VB程序,请问出现这个错误是什么原因呢?iPre没有这个变量啊?
oCom.CommandText="INSERT INTO UA#Process(DBiPre0,DBiPre1,DBiPre2,DBiPre3,DBiPre4,DBiPre5,DBiPre6,DBiPre7,DBiPre8,DBiPre9,DBiPre10,DBiPre11,DBiPre12,DBiPre13,DBiPre14,DBiPre15,DBiPre16,DBiPre17,DBiPre18,DBiPre19,DBiPre20,"
       oCom.CommandText=oCom.CommandText & "DBiPre21,DBiPre22,DBiPre23,DBiPre24,DBiPre25,DBiPre26,DBiPre27,DBiPre28,DBiPre29,iPre30,DBiPre31,DBfPipe_CPS0,DBfPipe_CPS1,DBfPipe_CPS2,DBfPipe_CPS3,DBfPipe_CPS4,"
       oCom.CommandText=oCom.CommandText & "DBfPipe_CPS5,DBfPipe_CPS6,DBfPipe_CPS7,DBfPipe_CPS8,DBfPipe_CPS9,DBfPipe_CPS10,DBfPipe_CPS11,DBfPipe_CPS12,DBfPipe_CPS13,DBfPipe_CPS14,DBfPipe_CPS15,DBfPipe_CPS16,"
       oCom.CommandText=oCom.CommandText & "DBfPipe_CPS17,DBfPipe_CPS18,DBfPipe_CPS19,DBfPipe_CPS20,DBfPipe_CPS21,DBfPipe_CPS22,fPipe_CPS23,DBfPipe_CPS24,DBfPipe_CPS25,DBfPipe_CPS26,DBfPipe_CPS27,DBfPipe_CPS28,DBfPipe_CPS29,DBfPipe_CPS30,DBfPipe_CPS31)"
    Msgbox oCom.CommandText
    oCom.CommandText=oCom.CommandText&"VALUES(" & Pre(0) & "," & Pre(1) & "," & Pre(2) & "," & Pre(3) &  "," & Pre(4) & "," & Pre(5) & "," & Pre(6) & "," & Pre(7) & "," & Pre(8) & "," & Pre(9) & "," & Pre(10) & "," & Pre(11) & "," & Pre(12) & "," & Pre(13) & "," & Pre(14) & "," & Pre(15) & "," 
    oCom.CommandText=oCom.CommandText & Pre(16) & "," & Pre(17) & "," & Pre(18) & "," & iPre(19) & "," & Pre(20) &  "," & Pre(21) & "," & Pre(22) & "," & Pre(23) & "," & Pre(24) & "," & Pre(25) & "," & Pre(26) & "," & Pre(27) & "," & Pre(28) & "," & Pre(29) & "," & Pre(30) & Pre(31) & "," 
    oCom.CommandText=oCom.CommandText & Pipe_CPS(0) & "," & Pipe_CPS(1) & "," & Pipe_CPS(2) & "," & Pipe_CPS(3) & "," & Pipe_CPS(4) & "," & Pipe_CPS(5) & "," & Pipe_CPS(6) & "," & Pipe_CPS(7) & "," & Pipe_CPS(8) & "," & Pipe_CPS(9) & "," & Pipe_CPS(10) & "," & Pipe_CPS(11) & "," & Pipe_CPS(12) & "," 
    oCom.CommandText=oCom.CommandText & Pipe_CPS(13) & "," & Pipe_CPS(14) & "," & Pipe_CPS(15) & "," & Pipe_CPS(16) & "," & Pipe_CPS(17) & "," & Pipe_CPS(18) & "," & Pipe_CPS(19) & "," & Pipe_CPS(20) & "," & Pipe_CPS(21) & "," & Pipe_CPS(22) & "," & Pipe_CPS(23) & "," & Pipe_CPS(24) & "," & Pipe_CPS(25) & "," 
    oCom.CommandText=oCom.CommandText & Pipe_CPS(26) & "," & Pipe_CPS(27) & "," & Pipe_CPS(28) & "," & Pipe_CPS(29) & "," & Pipe_CPS(30) & "," & Pipe_CPS(31) & ")"
    'oCom.CommandText=oCom.CommandText & "VALUES(" & Pre((0) & "," & Pre(1) & "," & Pre(2) & "," & Pre(3) & "," & Pre(4) & "," & Pre(5) & "," & Pre(6) & "," & Pre(7) & "," & Pre(8) & "," & Pre(9) & "," & Pre(10) & "," & Pre(11) & "," & Pre(12) & "," & Pre(13) & "," & Pre(14) & "," & Pre(15) & ","
    Msgbox oCom.CommandText

图片说明:

请教大家这个VB调试出错的原因?   

最佳答案

拼写错误吧
有提示啊,第185行找找就是了
看附图,是不是多打了一个字母i

图片说明:

请教大家这个VB调试出错的原因?  

提问者对于答案的评价:
非常感谢,问题解决了!

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

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

相关推荐