好象可以限制数据库的Cache Size.
后面知道的跟上...

解决方案 »

  1.   

    在数据库提交后,调用commitupdates方法,可以清除该数据控件占用的内存
    数据控件用完后要CLOSE
      

  2.   

    我也遇到过你这样的问题,我是作的三层结构的,
    Server:win2K Server+Com+/Mts+oracle816
    Client:95/98/2K,
    只要自己作的应用服务器一直开着,时间长了就出现这个问题
    后来的解决办法是不一直开着服务器端,只要所有用户都退出后
    服务器端自动退出,第一个进入的人稍微多等待一会会。这是不得已而为之
    你的系统难道24小时都要提供服务?
      

  3.   

    MTS能够在一段时间不用后自动退出的吧?
      

  4.   

    不知道这个对你有没有用 TDatabase.ApplyUpdatesCall ApplyUpdates to post pending cached updates for a specific set of open datasets to the database server. ApplyUpdates is only meaningful if the CachedUpdates property of a specified dataset is True.DataSets is a list of dataset names specifying the datasets for which to post pending updates. DataSets need not list every currently open dataset. For each listed dataset ApplyUpdates calls the dataset抯 ApplyUpdates and CommitUpdates methods to post that dataset抯 pending cached updates.Applying updates is a two-phase process that takes place within the context of the database component抯 transaction control. When an application calls ApplyUpdates, the following events take place:1 A database transaction starts.
    2 Cached updates are written to the database (Phase 1).If the database write is successful:1  Database changes are committed, ending the transaction.
    2  Cached updates are committed, clearing the internal cache buffer(Phase 2).If the database write fails database changes are rolled back, ending the transaction.The two-phased approach allows for effective error recovery, especially when updating multiple and interrelated datasets (for example, the datasets associated with a master/detail form).
      

  5.   

    to falaly:
    with ZOraSqlQuery3 do
    begin
        close;
        sql.clear;
        sql.add('delete from tab_message where message_state=27 and senderer like '''+senderer+'''');
        execsql;
    end;
      

  6.   

    你写得代码功能实现上肯定是没问题!
    但不是最佳,我猜想这可能是你的问题所在!
    把所有的数据更新代码放进事务里,提交时不
    要用ExeSql,不要怕代码长,用一个好的提交模式:
      with CustomerQuery do
      begin
      Database1.StartTransaction;
        try
          ApplyUpdates; {try to write the updates to the database};
          Database1.Commit; {on success, commit the changes};
        except
          Database1.Rollback; {on failure, undo the changes};
        raise; {raise the exception to prevent a call to CommitUpdates!}
        end;
      CommitUpdates; {on success, clear the cache}
      end;
    你可以试一下,看问题能不能得到解决,我以前写代码的时候都是
    这样提交的,不过没注意过有没有此类问题,希望对你有帮助!!!
      

  7.   

    我倒是觉得你的SQL语句执行完以后不妨来个CLOSE
      

  8.   

    to taogou:已经试过了,问题依然存在!
    to tonylover:你的方法不能治本啊!
      

  9.   

    改用ADO,不要用BDE,并且用ADO时直接用TADODataSet进行增删改,这样,你的内存就游什么有余了
      

  10.   

    ADO\BDE这些都不能进行长时间、频繁地数据库操作才换成ZEOS的,请高手继续指教!
      

  11.   

    learn from you ! help you to up
      

  12.   


    try .....
    finally.....
    语句
      

  13.   

    动态创建:query控件。
    比如:
    query1:=query.create;
    query1.close;
    query1.add(insert into table1 values('aa','bb');
    query1.execsql;
    query1.free;