You table needs to have a primay key defined in the database.  The CommandBuilder uses this key to process updates and deletes

解决方案 »

  1.   

    But I have defined it in my oracle db as following,
    create table test_t
    (
        username           char(20)       not null,    
        copid              number(3,0)    not null,--user id    
        lcount             int            not null
    );
    create unique index test_t_x1 on test_t (username);
    create unique index test_t_x2 on test_t (copid);By the way, I used the DataSet ! Whether the primay key will be missed when select the data from db to dataset?Thanks in advance!
      

  2.   


    create table test_t
    (
        username           char(20)       not null,    
        copid              number(3,0)    not null,--user id    
        lcount             int            not null
        constraint PK_test primary key  (copid)
    );
    试试这样创建表
      

  3.   

    我按照你的方法把primary key 加到我的DB, 但问题还是存在。
    敬请各位高手提供解决之道。谢谢!!!BTW,可以加个临时的primary key 在DataSet, 而不用在DB里加呢?因为我的DB不需要primary key。