28 |
|
|
29 |
|
unit IBStoredProc; |
30 |
|
|
31 |
< |
interface |
31 |
> |
{$Mode Delphi} |
32 |
|
|
33 |
< |
uses Windows, SysUtils, Graphics, Classes, Controls, Db, StdVCL, IB, |
34 |
< |
IBDatabase, IBCustomDataSet, IBHeader, IBSQL, IBUtils; |
33 |
> |
interface |
34 |
|
|
35 |
+ |
uses SysUtils, Classes, DB, IB, IBDatabase, IBCustomDataSet, |
36 |
+ |
IBHeader, IBSQL, IBUtils; |
37 |
+ |
|
38 |
|
{ TIBStoredProc } |
39 |
|
type |
40 |
|
|
59 |
|
procedure WriteParamData(Writer: TWriter); |
60 |
|
|
61 |
|
protected |
60 |
– |
{ IProviderSupport } |
61 |
– |
procedure PSExecute; override; |
62 |
– |
function PSGetTableName: string; override; |
63 |
– |
function PSGetParams: TParams; override; |
64 |
– |
procedure PSSetCommandText(const CommandText: string); override; |
65 |
– |
procedure PSSetParams(AParams: TParams); override; |
62 |
|
|
63 |
|
procedure DefineProperties(Filer: TFiler); override; |
64 |
|
procedure SetFiltered(Value: Boolean); override; |
515 |
|
Reader.ReadCollection(Params); |
516 |
|
end; |
517 |
|
|
522 |
– |
{ TIBStoredProc IProviderSupport } |
523 |
– |
|
524 |
– |
function TIBStoredProc.PSGetParams: TParams; |
525 |
– |
begin |
526 |
– |
Result := Params; |
527 |
– |
end; |
528 |
– |
|
529 |
– |
procedure TIBStoredProc.PSSetParams(AParams: TParams); |
530 |
– |
begin |
531 |
– |
if AParams.Count > 0 then |
532 |
– |
Params.Assign(AParams); |
533 |
– |
Close; |
534 |
– |
end; |
535 |
– |
|
536 |
– |
function TIBStoredProc.PSGetTableName: string; |
537 |
– |
begin |
538 |
– |
{ ! } |
539 |
– |
end; |
540 |
– |
|
541 |
– |
procedure TIBStoredProc.PSExecute; |
542 |
– |
begin |
543 |
– |
ExecProc; |
544 |
– |
end; |
545 |
– |
|
546 |
– |
procedure TIBStoredProc.PSSetCommandText(const CommandText: string); |
547 |
– |
begin |
548 |
– |
if CommandText <> '' then |
549 |
– |
StoredProcName := CommandText; |
550 |
– |
end; |
551 |
– |
|
518 |
|
end. |