ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/runtime/IBSQL.pas
(Generate patch)

Comparing ibx/trunk/runtime/IBSQL.pas (file contents):
Revision 19 by tony, Mon Jul 7 13:00:15 2014 UTC vs.
Revision 21 by tony, Thu Feb 26 10:33:34 2015 UTC

# Line 79 | Line 79 | uses
79    SysUtils, Classes, Forms, Controls, IBHeader,
80    IBErrorCodes, IBExternals, DB, IB, IBDatabase, IBUtils, IBXConst;
81  
82 + const
83 +   sSQLErrorSeparator = ' When Executing: ';
84 +
85   type
86    TIBSQL = class;
87    TIBXSQLDA = class;
# Line 896 | Line 899 | begin
899            result := AsDouble;
900        SQL_INT64:
901          if FXSQLVAR^.sqlscale = 0 then
902 <          IBError(ibxeInvalidDataConversion, [nil])
902 >          result := AsInt64
903          else if FXSQLVAR^.sqlscale >= (-4) then
904            result := AsCurrency
905          else
# Line 2710 | Line 2713 | begin
2713      on E: Exception do begin
2714        if (FHandle <> nil) then
2715          FreeHandle;
2716 <      raise;
2716 >      if E is EIBInterBaseError then
2717 >        raise EIBInterBaseError.Create(EIBInterBaseError(E).SQLCode,
2718 >                                       EIBInterBaseError(E).IBErrorCode,
2719 >                                       EIBInterBaseError(E).Message +
2720 >                                       sSQLErrorSeparator + FProcessedSQL.Text)
2721 >      else
2722 >        raise;
2723      end;
2724    end;
2725   end;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines