数据库是ms-sql7.0,系统、vb、sql都打过补丁声明recordset的变量rs1
rs1.edit的方法无法更新数据库,调试到rs1.update语句时,提示:错误号:3197,the microsoft jet database engine stopped the process because you and another user are attempting to change the same date at the same time在相同的地方换用rs1.addnew的方法就可以,整个程序只有两个地方使用该方法,另一处不会有问题,万分迷惑,望高手们指教!

解决方案 »

  1.   

    检察一下数据库,看一下有无触发器之类的,
    还有,ADO是没有EDIT这个方法的。
      

  2.   

    怎么会是jet database engine报错呢?没搞懂
      

  3.   

    提示:错误号:3197,the microsoft jet database engine stopped the process because you and another user are attempting to change the same date at the same time是不是你打开了两个相同的实例哦!!
      

  4.   

    我会先去查查触发器的问题补充一下:
    我有两个recordset对象,用不同的查询条件打开的,rs1和rs2,但是我没有同时用这2个对象的edit方法呀,程序原来可以用edit的方法的,跑得很正常,后来我往其中一个表中增加了几个字段,程序中改了些查询条件和grid的显示数据后,就不行了帮帮忙吧
      

  5.   

    不用rs1.edit这个方法,找到指定的记录之后直接修改,然后更新就可以了!!
      

  6.   

    cuizm(射天狼) 
    我试过了,你说的方法不行,update之前必须要用edit或addnew的方法才行。
      

  7.   

    不用rs1.edit这个方法,找到指定的记录之后直接修改,然后更新就可以了!!
      

  8.   

    谁说不好用!?你怎么试的~~~~~~rs.Open "select * from stk_CONTROLMAIN where CID=" & RcdID, cn, adOpenKeyset, adLockOptimistic        rs("CTYPE") = Trim(cmbCType.Text)
            rs!CPOINT = cmbCPoint.ListIndex
            rs!CAUTHOR = Trim(txtAuthor.Text)
            rs!CORIGIN = Trim(txtOrigin.Text)
            rs!CTYPER = mdiTyper.UserName
            rs!CCOURSE = Trim(cmbCourse.Text)
            rs!CUSEDNUM = 0
            rs!ckey = Trim(CmbKey.Text)
            rs!CLOCKED = 0
            rs!CDate = Format(Now, "YYYY/MM/DD HH:MM:SS")
            rs!CLASTUSEDATE = Format(Now, "YYYY/MM/DD HH:MM:SS")
            rs!MQUESTION = rtbQuestion.TextRTF
            rs!MANSWER = rtbAnswer.TextRTF
            rs.Update