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

Comparing ibx/trunk/runtime/IBUpdateSQL.pas (file contents):
Revision 7 by tony, Sun Aug 5 18:28:19 2012 UTC vs.
Revision 143 by tony, Fri Feb 23 12:11:21 2018 UTC

# Line 27 | Line 27
27   {    IBX For Lazarus (Firebird Express)                                  }
28   {    Contributor: Tony Whyman, MWA Software http://www.mwasoftware.co.uk }
29   {    Portions created by MWA Software are copyright McCallum Whyman      }
30 < {    Associates Ltd 2011                                                 }
30 > {    Associates Ltd 2011 - 2018                                               }
31   {                                                                        }
32   {************************************************************************}
33  
# Line 58 | Line 58 | type
58      procedure SetDataSet(ADataSet: TIBCustomDataSet); override;
59      procedure SQLChanged(Sender: TObject);
60      procedure Apply(UpdateKind: TUpdateKind; buff: PChar); override;
61 <    procedure ExecSQL(UpdateKind: TUpdateKind);
61 >    procedure ExecSQL(UpdateKind: TUpdateKind; buff: PChar);
62    public
63      constructor Create(AOwner: TComponent); override;
64      destructor Destroy; override;
# Line 100 | Line 100 | begin
100    inherited Destroy;
101   end;
102  
103 < procedure TIBUpdateSQL.ExecSQL(UpdateKind: TUpdateKind);
103 > procedure TIBUpdateSQL.ExecSQL(UpdateKind: TUpdateKind; buff: PChar);
104   begin
105    InternalPrepare(UpdateKind);
106    with Query[UpdateKind] do
107    begin
108      ExecQuery;
109 <    if RowsAffected <> 1 then IBError(ibxeUpdateFailed, [nil]);
109 > //    if RowsAffected <> 1 then IBError(ibxeUpdateFailed, [nil]);
110 > // Commented out in release 1.2
111 >    if FieldCount > 0 then  {Has RETURNING Clause}
112 >      UpdateRecordFromQuery(UpdateKind,Current,Buff);
113    end;
114   end;
115  
# Line 182 | Line 185 | procedure TIBUpdateSQL.Apply(UpdateKind:
185   begin
186    if not Assigned(FDataSet) then Exit;
187    InternalPrepare(UpdateKind);
188 <  InternalSetParams(Query[UpdateKind],buff);
189 <  ExecSQL(UpdateKind);
188 >  InternalSetParams(Query[UpdateKind].Params,buff);
189 >  ExecSQL(UpdateKind,buff);
190   end;
191  
192   end.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines