本人在使用Delphi7的DbExpress数据引擎时,遇到一个问题,现无法解决,希望大家给点建议:
 (1)现象:
    在如下的代码中
    Try
    l_TrinId.TransactionID:=1;
    l_TrinId.IsolationLevel:=xilReadCommitted;
    Dm.Sql_Db.StartTransaction(l_TrinId);    If Sds_Photo.IsEmpty Then
     Begin
       Sds_Photo.Append;
       ....
       Sds_Photo.Post;
     End
    IF Sds_Photo.ApplyUpdates(0)>0 Then
       Raise Exception.Create('保存信息提交数据库失败');
    Dm.Sql_Db.Commit(l_TrinId);
  Except
    on E: Exception do
         Dm.Sql_Db.Rollback(l_TrinId);
  End;
  在执行到Dm.Sql_Db.Commit(l_TrinId);时,会不定期的遇到Delphi报错“不能启动新的事务处理”
  (2)这个报错不固定,有时每操作一次就报错,有时操作1、2个小时才报错。
  (3)一旦报错,则后面的任何事务开始Dm.Sql_Db.StartTransaction(l_TrinId);
都会报错,程序无法在使用。只有退出程序,再次进入,才可能继续。
  (4)我在Win2000和win98下都试过了,现象一样。