query1.close;   
  query1.sql.clear;   
  query1.sql.add('select   *   from   表');   
  query1.open;   
    
  query1.edit;           //   此句有问题   
          
  query1.first;   
  while   not   query1.eof   do     
  begin   
      .....   
  end;   
    
  执行时说     query1:can   not   modify   a   read_only     dataset   
  请问怎么解决(尽量不用table控件)

解决方案 »

  1.   

    query1.avtive:=true;
    应该添加此语句
      

  2.   

    不行啦。2楼、3楼RequestLive设置T后,总是表不存在
    cachedupdates设置T也一样的。咋搞?
      

  3.   

    query1.close;   
      query1.sql.clear;   
      query1.sql.add('select   *   from   表');   
      query1.open;          
      query1.first;   
      while   not   query1.eof   do     
      begin 
        query1.edit;   
          .....
        query1.posr;
        query1.next;   
      end;
      

  4.   

    当然requestlive应该设置为true。表查询不能联合多表
      

  5.   

    edit 这名多余
    删除则可.
    因为OPEN后是 dsEdit,dsInsert 状态了