60 |
|
|
61 |
|
implementation |
62 |
|
|
63 |
< |
uses variants, FmtBCD, DateUtils; |
63 |
> |
uses variants, FmtBCD, DateUtils, FBNumeric; |
64 |
|
|
65 |
|
type |
66 |
|
|
89 |
|
{ISQLParams} |
90 |
|
function getCount: integer; |
91 |
|
function getSQLParam(index: integer): ISQLParam; |
92 |
+ |
function ParamExists(Idx: AnsiString): boolean; |
93 |
|
function ByName(Idx: AnsiString): ISQLParam ; |
94 |
|
function GetModified: Boolean; |
95 |
|
function GetHasCaseSensitiveParams: Boolean; |
96 |
+ |
function GetStatement: IStatement; |
97 |
+ |
function GetTransaction: ITransaction; |
98 |
+ |
function GetAttachment: IAttachment; |
99 |
+ |
procedure Clear; |
100 |
|
end; |
101 |
|
|
102 |
|
{ TParamIntf } |
142 |
|
function GetAsBlob: IBlob; |
143 |
|
function GetAsArray: IArray; |
144 |
|
function GetAsBCD: tBCD; |
145 |
+ |
function GetAsNumeric: IFBNumeric; |
146 |
|
function GetStatement: IStatement; |
147 |
|
function GetTransaction: ITransaction; |
148 |
+ |
function GetAttachment: IAttachment; |
149 |
|
procedure Clear; |
150 |
|
function GetModified: boolean; |
151 |
|
procedure SetAsBoolean(AValue: boolean); |
174 |
|
procedure SetAsQuad(aValue: TISC_QUAD); |
175 |
|
procedure SetCharSetID(aValue: cardinal); |
176 |
|
procedure SetAsBcd(aValue: tBCD); |
177 |
+ |
procedure SetAsNumeric(Value: IFBNumeric); |
178 |
|
end; |
179 |
|
|
180 |
|
{ TParamIntf } |
470 |
|
Result := VarToBCD(FOwner.FParams[FIndex].Value); |
471 |
|
end; |
472 |
|
|
473 |
+ |
function TParamIntf.GetAsNumeric: IFBNumeric; |
474 |
+ |
begin |
475 |
+ |
IBError(ibxeNotSupported,[]); |
476 |
+ |
end; |
477 |
+ |
|
478 |
|
function TParamIntf.GetStatement: IStatement; |
479 |
|
begin |
480 |
|
IBError(ibxeNotSupported,[]); |
485 |
|
IBError(ibxeNotSupported,[]); |
486 |
|
end; |
487 |
|
|
488 |
+ |
function TParamIntf.GetAttachment: IAttachment; |
489 |
+ |
begin |
490 |
+ |
IBError(ibxeNotSupported,[]); |
491 |
+ |
end; |
492 |
+ |
|
493 |
|
procedure TParamIntf.Clear; |
494 |
|
begin |
495 |
|
FOwner.SetParam(FIndex,NULL); |
656 |
|
FOwner.SetParam(FIndex,VarFmtBCDCreate(AValue)); |
657 |
|
end; |
658 |
|
|
659 |
+ |
procedure TParamIntf.SetAsNumeric(Value: IFBNumeric); |
660 |
+ |
begin |
661 |
+ |
IBError(ibxeNotSupported,[]); |
662 |
+ |
end; |
663 |
+ |
|
664 |
|
{ TParamListIntf } |
665 |
|
|
666 |
|
procedure TParamListIntf.SetParam(index: integer; aValue: variant); |
720 |
|
Result := TParamIntf.Create(self,index); |
721 |
|
end; |
722 |
|
|
723 |
+ |
function TParamListIntf.ParamExists(Idx: AnsiString): boolean; |
724 |
+ |
begin |
725 |
+ |
Result := ByName(Idx) <> nil; |
726 |
+ |
end; |
727 |
+ |
|
728 |
|
function TParamListIntf.ByName(Idx: AnsiString): ISQLParam; |
729 |
|
var i: integer; |
730 |
|
begin |
747 |
|
Result := false; |
748 |
|
end; |
749 |
|
|
750 |
+ |
function TParamListIntf.GetStatement: IStatement; |
751 |
+ |
begin |
752 |
+ |
IBError(ibxeNotSupported,[]); |
753 |
+ |
end; |
754 |
+ |
|
755 |
+ |
function TParamListIntf.GetTransaction: ITransaction; |
756 |
+ |
begin |
757 |
+ |
IBError(ibxeNotSupported,[]); |
758 |
+ |
end; |
759 |
+ |
|
760 |
+ |
function TParamListIntf.GetAttachment: IAttachment; |
761 |
+ |
begin |
762 |
+ |
Result := Database.Attachment; |
763 |
+ |
end; |
764 |
+ |
|
765 |
+ |
procedure TParamListIntf.Clear; |
766 |
+ |
var i: integer; |
767 |
+ |
begin |
768 |
+ |
for i := 0 to getCount - 1 do |
769 |
+ |
getSQLParam(i).Clear; |
770 |
+ |
end; |
771 |
+ |
|
772 |
|
{ TIBUpdate } |
773 |
|
|
774 |
|
function TIBUpdate.GetSQL(UpdateKind: TUpdateKind): TStrings; |