query:cannot perform this operation on a closed dataset.

解决方案 »

  1.   

    dataset关闭了,在执行query检查一下dataset
      

  2.   

    我刚刚学习delphi,不知道如何检查,请您说清楚点,谢谢!!!
      

  3.   

    数据集已经关闭,要添加、修改数据时,先打开数据集。
    如:query1.open
      

  4.   

    我是这样写的
    query1.open ;
    query1.append ;
    但是还是出那个错误。
      

  5.   

    又出现下列错误:
    query1:cannot modify a read-only dataset.
    这是怎么回事,应该如何解决?
      

  6.   

    1.把有read only属性的值改为:false;
    2.如 fancylee(小恐龙)
      

  7.   

    请在说清楚一点,我不知道哪儿有一个read only属性,具体语句是怎样写的,谢谢大侠
      

  8.   

    先把:query1.RequestLive:=true;
    看看query中是否添加有固定字段,在固定字段中的属性中有read only。
      

  9.   

    1.检查你的数据库文件看他的属性(在windows 下检查),去掉只读属性。
    2.如果你的query的sql为空,而datasource不空,检查你的query.datasource.readonly属性
    3.检查你的query.readonly属性
      

  10.   

    with query do
    begin
    edit
    readonly:=false;
    open
    append
    .
    .
    end;
    全加上....呵呵...