insert就是update操作之一,你修改后的OperNum值再数据库中已经存在,主键约束。

解决方案 »

  1.   

    只是对查找到的记录进行edit,修改罢了,并非在当前位置insert一条和表中主键
    opernum相同的数啊,我在桌面型数据库中都没有这种情况,还有list index out of bounds(1)
    窗体中只有一个Combobox1控件,item也没问题,怎么回事?
      

  2.   

    你的0-6哪一个对应OperNum字段,把那一句注释掉就应该可以了。
      

  3.   

    具体该如何操作呢?To:你的0-6哪一个对应OperNum字段,把那一句注释掉就应该可以了。
    不行,还是同样错误!
      

  4.   


    ---------------------------
    Debugger Exception Notification
    ---------------------------
    Project MS3.exe raised exception class EListError with message 'List index out of bounds (1)'. Process stopped. Use Step or Run to continue.
    ---------------------------
    OK   Help   
    ---------------------------
    现在就提示上面的错误!!请指教!!
      

  5.   


    ---------------------------
    Debugger Exception Notification
    ---------------------------
    Project MS3.exe raised exception class EListError with message 'List index out of bounds (1)'. Process stopped. Use Step or Run to continue.
    ---------------------------
    OK   Help   
    ---------------------------
    现在就提示上面的错误!!请指教!!