见程序:     Adodc3.CommandType = adCmdText
     Adodc3.RecordSource = "select * from setc where 141000<=userno and userno>=142999 order by userno"
     Adodc3.Refresh
     
     Adodc1.Recordset.MoveFirst
     
     Do While Not Adodc1.Recordset.EOF
      
         Adodc3.Recordset.AddNew
      
         Text3(0).Text = Text1(0).Text
         Text3(1).Text = Val(Text1(3).Text) + Val(Text1(5).Text)
         Text3(2).Text = Val(Text1(4).Text) + Val(Text1(6).Text)
            
         Adodc3.Recordset.Fields("tottc") = 0         '问题出现(开始几条记录没有问题)
         Adodc3.Recordset.Update
         Adodc1.Recordset.MoveNext
     Loop

解决方案 »

  1.   

    反复频繁的执行Update是会有问题的。你为什么不在一个SQL语句里面完成呢?
      

  2.   

    Text3(0).Text = Text1(0).Text
    Text3(1).Text = Val(Text1(3).Text) + Val(Text1(5).Text)
    Text3(2).Text = Val(Text1(4).Text) + Val(Text1(6).Text)不明白这段代码的意思,你的整个思路都看不明不知道你要实现什么?
      

  3.   

    update setc set tottc='0' where 141000<=userno and userno>=142999
      

  4.   

    呵呵...我是从一foxpro表取数据到另外一个表
      

  5.   

    如:TechnoFantasy(冰儿马甲www.applevb.com) 所说
     
      反复频繁的执行Update是会有问题的。
      
     
      

  6.   

    update setc set tottc= "& 0 &" where 141000<=userno and userno>=142999
      

  7.   

    问题解决了!
    原程序环境:vb6.0 + vfp5.0 + Win98
    现在环境:vb6.0 + vfp5.0 + WinXp将ADO改为:CursorLocation:adUseserver;
    并在程序前加:On Error Resume Next
    OK!!!