troubleshooting Question

Firbird Transaction Failure

Avatar of SuperTumorz
SuperTumorzFlag for Afghanistan asked on
DatabasesProgramming Theory
6 Comments1 Solution1319 ViewsLast Modified:
I am absolutely at a loss with this. My application is written Delphi 2007, uses the UniDac 3.60 components from devart.com to access a 2.1 Firebird database. A particular customer, and only one of them is having a problem where database transactions seem to be failing. The code to write the transaction is very simple. It tries 5 times before returning an error message to the user. Here is a snippet of the code.


function TCustomerPayment.SaveTransaction: Boolean;
var
  done       : Boolean;
  retryCount : Integer;

begin

  retryCount := 0;
  done       := False;
  Result     := False;

  while not done do
  begin
     try
       UniConn.StartTransaction;

       tblPayment.Append;
       ...
       ...
       tblPayment.Post;       // On rare occassions this transaction appears in the database twice ????

       UniConn.Commit;
       done   := True;
       Result := True;

     except
       begin
         UniConn.Rollback;

         Inc(retryCount);
         if retryCount = 5 then
         begin
            done := True;
         end;
       end;
     end;

  end;
end;

Has anybody got any idea why in this one customers database more than one transaction can appear for the above code?

I have found that on their server, which runs Windows 2003 server, with 2GB Ram and very slow SCSI disks that the firebird.log file contains many error reports. Incidentially, this server also hosts our applications exe file and all users are connected and sharing files as well as accessing the database. All of these firebird errors seem to be 10054 errors. Could these be a clue. I have attached the firebird log. Any assistance would be greatly appreciated.
ASKER CERTIFIED SOLUTION
IrynaP

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros