Browse Source

* Fixed bug #9342 as suggested by reporter Sergey Smirnov

git-svn-id: trunk@8881 -
joost 18 years ago
parent
commit
2d60c1e5cf
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/fcl-db/src/sqldb/interbase/ibconnection.pp

+ 3 - 1
packages/fcl-db/src/sqldb/interbase/ibconnection.pp

@@ -136,15 +136,17 @@ var
   buf : array [0..1024] of char;
   Msg : string;
   E   : EIBDatabaseError;
+  Err : longint;
   
 begin
   if ((Status[0] = 1) and (Status[1] <> 0)) then
   begin
+    Err := Status[1];
     msg := '';
     while isc_interprete(Buf, @Status) > 0 do
       Msg := Msg + LineEnding +' -' + StrPas(Buf);
     E := EIBDatabaseError.CreateFmt('%s : %s : %s',[self.Name,ProcName,Msg]);
-    E.GDSErrorCode := Status[1];
+    E.GDSErrorCode := Err;
     Raise E;
   end;
 end;