43 |
|
{$ELSE} |
44 |
|
unix, |
45 |
|
{$ENDIF} |
46 |
< |
SysUtils, Graphics, Classes, Controls, Db, |
46 |
> |
SysUtils, Classes, Db, |
47 |
|
IBHeader, IB, IBCustomDataSet, IBSQL, IBSQLParser; |
48 |
|
|
49 |
|
type |
60 |
|
FCheckRowsAffected: Boolean; |
61 |
|
FSQLUpdating: boolean; |
62 |
|
function GetRowsAffected: Integer; |
63 |
< |
procedure PrepareSQL(Value: PChar); |
63 |
> |
procedure PrepareSQL; |
64 |
|
procedure QueryChanged(Sender: TObject); |
65 |
|
procedure ReadParamData(Reader: TReader); |
66 |
|
procedure SetQuery(Value: TStrings); |
110 |
|
|
111 |
|
published |
112 |
|
property Active; |
113 |
+ |
property AutoCommit; |
114 |
|
property BufferChunks; |
115 |
|
property CachedUpdates; |
116 |
|
property DataSource read GetDataSource write SetDataSource; |
123 |
|
property UniDirectional default False; |
124 |
|
property UpdateObject; |
125 |
|
property Filtered; |
126 |
+ |
property DataSetCloseAction; |
127 |
|
|
128 |
|
property BeforeDatabaseDisconnect; |
129 |
|
property AfterDatabaseDisconnect; |
132 |
|
property AfterTransactionEnd; |
133 |
|
property TransactionFree; |
134 |
|
property OnFilterRecord; |
135 |
+ |
property OnValidatePost; |
136 |
|
end; |
137 |
|
|
138 |
|
implementation |
296 |
|
begin |
297 |
|
FRowsAffected := -1; |
298 |
|
FCheckRowsAffected := True; |
299 |
< |
if Length(Text) > 1 then PrepareSQL(PChar(Text)) |
299 |
> |
if Length(Text) > 1 then PrepareSQL |
300 |
|
else IBError(ibxeEmptySQLStatement, [nil]); |
301 |
|
end |
302 |
|
else |
322 |
|
for I := 0 to FParams.Count - 1 do |
323 |
|
with FParams[I] do |
324 |
|
if not Bound then |
325 |
< |
IBError(ibxeRequiredParamNotSet, [nil]); |
325 |
> |
IBError(ibxeRequiredParamNotSet, [FParams[I].Name]); |
326 |
|
end; |
327 |
|
|
328 |
|
begin |
418 |
|
end; |
419 |
|
ftString: |
420 |
|
SQLParam.AsString := Params[i].AsString; |
421 |
< |
ftBoolean, ftSmallint, ftWord: |
421 |
> |
ftBoolean: |
422 |
> |
SQLParam.AsBoolean := Params[i].AsBoolean; |
423 |
> |
ftSmallint, ftWord: |
424 |
|
SQLParam.AsShort := Params[i].AsSmallInt; |
425 |
|
ftInteger: |
426 |
|
SQLParam.AsLong := Params[i].AsInteger; |
445 |
|
end; |
446 |
|
end; |
447 |
|
|
448 |
< |
procedure TIBQuery.PrepareSQL(Value: PChar); |
448 |
> |
procedure TIBQuery.PrepareSQL; |
449 |
|
begin |
450 |
|
QSelect.GenerateParamNames := GenerateParamNames; |
451 |
|
InternalPrepare; |
546 |
|
end; |
547 |
|
*) |
548 |
|
end. |
549 |
< |
|
549 |
> |
|