134 |
|
const |
135 |
|
{Interface version information} |
136 |
|
FBIntf_Major = 1; |
137 |
< |
FBIntf_Minor = 3; |
138 |
< |
FBIntf_Release = 2; |
139 |
< |
FBIntf_Version = '1.3.2'; |
137 |
> |
FBIntf_Minor = 4; |
138 |
> |
FBIntf_Release = 0; |
139 |
> |
FBIntf_Version = '1.4.0'; |
140 |
|
|
141 |
|
const |
142 |
|
{DPB, TPB and SPB Parameter Block Name Prefixes} |
248 |
|
ITransaction = interface; |
249 |
|
IStatement = interface; |
250 |
|
|
251 |
+ |
{The IFBNumeric interface provides a managed type for Fixed Point integers |
252 |
+ |
used to hold Firebird Numeric(m,n) types} |
253 |
+ |
|
254 |
+ |
IFBNumeric = interface |
255 |
+ |
['{8bdccfe9-d552-446b-bd82-844ca264455d}'] |
256 |
+ |
function getRawValue: Int64; |
257 |
+ |
function getScale: integer; |
258 |
+ |
function AdjustScaleTo(aNewScale: integer): IFBNumeric; |
259 |
+ |
function getAsString: AnsiString; |
260 |
+ |
function getAsDouble: double; |
261 |
+ |
function getAsBCD: TBCD; |
262 |
+ |
function getAsInt64: Int64; {scaled} |
263 |
+ |
function getAsInteger: integer; {scaled - may be truncated} |
264 |
+ |
function getAsSmallInt: SmallInt; {scaled - may be truncated} |
265 |
+ |
function getAsCurrency: Currency; |
266 |
+ |
end; |
267 |
+ |
|
268 |
|
{The IParameterBlock interface provides the template for all parameter |
269 |
|
block interfaces} |
270 |
|
|
517 |
|
function GetDateTimeStrLength(DateTimeFormat: TIBDateTimeFormats): integer; |
518 |
|
function GetStatement: IStatement; |
519 |
|
function GetTransaction: ITransaction; |
520 |
+ |
function GetAttachment: IAttachment; |
521 |
|
property Name: AnsiString read GetName; |
522 |
|
property Size: cardinal read GetSize; |
523 |
|
property SQLType: cardinal read GetSQLType; |
584 |
|
function GetAsBlob(BPB: IBPB): IBlob; overload; |
585 |
|
function GetAsArray: IArray; |
586 |
|
function GetAsBCD: tBCD; |
587 |
+ |
function GetAsNumeric: IFBNumeric; |
588 |
|
property AsDate: TDateTime read GetAsDateTime; |
589 |
|
property AsBoolean:boolean read GetAsBoolean; |
590 |
|
property AsTime: TDateTime read GetAsDateTime; |
603 |
|
property AsBlob: IBlob read GetAsBlob; |
604 |
|
property AsArray: IArray read GetAsArray; |
605 |
|
property AsBCD: tBCD read GetAsBCD; |
606 |
+ |
property AsNumeric: IFBNumeric read GetAsNumeric; |
607 |
|
property IsNull: Boolean read GetIsNull; |
608 |
|
property Value: Variant read GetAsVariant; |
609 |
|
end; |
619 |
|
function getCount: integer; |
620 |
|
function GetStatement: IStatement; |
621 |
|
function GetTransaction: ITransaction; |
622 |
+ |
function GetAttachment: IAttachment; |
623 |
|
function ByName(Idx: AnsiString): ISQLData; |
624 |
|
function getSQLData(index: integer): ISQLData; |
625 |
|
procedure GetData(index: integer; var IsNull:boolean; var len: short; var data: PByte); |
635 |
|
} |
636 |
|
IResultSet = interface(IResults) |
637 |
|
['{0ae4979b-7857-4e8c-8918-ec6f155b51a0}'] |
638 |
< |
function FetchNext: boolean; |
638 |
> |
function FetchNext: boolean; {fetch next record} |
639 |
> |
function FetchPrior: boolean; {fetch previous record} |
640 |
> |
function FetchFirst:boolean; {fetch first record} |
641 |
> |
function FetchLast: boolean; {fetch last record} |
642 |
> |
function FetchAbsolute(position: Integer): boolean; {fetch record by its absolute position in result set} |
643 |
> |
function FetchRelative(offset: Integer): boolean; {fetch record by position relative to current} |
644 |
|
function GetCursorName: AnsiString; |
645 |
+ |
function IsBof: boolean; |
646 |
|
function IsEof: boolean; |
647 |
|
procedure Close; |
648 |
|
end; |
649 |
|
|
650 |
|
{The ISQLParam interface is used to provide access to each parameter in a |
651 |
< |
parametised SQL Statement. It subclasses IColumnMetaData and this part of |
625 |
< |
the interface may be used to access information on the expected SQL Type, etc. |
626 |
< |
|
627 |
< |
It also subclasses ISQLData and this part of the interface may be used to access |
628 |
< |
current values for each parameter. |
629 |
< |
|
630 |
< |
Otherwise, the interface comprises the Setter Methods and properties used to |
651 |
> |
parametised SQL Statement. The interface comprises the Setter Methods and properties used to |
652 |
|
set the value of each parameter. |
653 |
|
|
654 |
|
Automatic conversion is provided to and from strings. That is GetAsString and |
655 |
|
SetAsString are safe to use for sql types other than boolean - provided automatic |
656 |
|
conversion is possible. |
657 |
+ |
|
658 |
+ |
ISQLParam is subclassed from the IParamMetaData interface. This interface provides |
659 |
+ |
access to the parameter metadata. This metadata is mutable and can change after |
660 |
+ |
a parameter is set to a given value. This is acceptable as long as the parameter |
661 |
+ |
metadata is type compatible with the underlying column metadata and hence the |
662 |
+ |
parameter value can be converted by Firebird into a value acceptable by the |
663 |
+ |
underlying column. The column metadata, which is unmutable, can be obtained |
664 |
+ |
by the ISQLParam.getColMetadata interface. When a statement is prepared, the |
665 |
+ |
parameter metadata is always initialised to the column metadata. |
666 |
|
} |
667 |
|
|
668 |
< |
ISQLParam = interface |
669 |
< |
['{b22b4578-6d41-4807-a9a9-d2ec8d1d5a14}'] |
640 |
< |
function GetIndex: integer; |
668 |
> |
IParamMetaData = interface |
669 |
> |
['{4e148c4e-2d48-4991-a263-f66eca05c6aa}'] |
670 |
|
function GetSQLType: cardinal; |
671 |
|
function GetSQLTypeName: AnsiString; |
672 |
|
function getSubtype: integer; |
644 |
– |
function getName: AnsiString; |
673 |
|
function getScale: integer; |
674 |
|
function getCharSetID: cardinal; |
675 |
|
function getCodePage: TSystemCodePage; |
676 |
|
function getIsNullable: boolean; |
677 |
|
function GetSize: cardinal; |
678 |
+ |
property SQLType: cardinal read GetSQLType; |
679 |
+ |
end; |
680 |
+ |
|
681 |
+ |
ISQLParam = interface(IParamMetaData) |
682 |
+ |
['{b22b4578-6d41-4807-a9a9-d2ec8d1d5a14}'] |
683 |
+ |
function getColMetadata: IParamMetaData; |
684 |
+ |
function GetStatement: IStatement; |
685 |
+ |
function GetTransaction: ITransaction; |
686 |
+ |
function GetAttachment: IAttachment; |
687 |
+ |
function GetIndex: integer; |
688 |
+ |
function getName: AnsiString; |
689 |
|
function GetAsBoolean: boolean; |
690 |
|
function GetAsCurrency: Currency; |
691 |
|
function GetAsInt64: Int64; |
709 |
|
function GetAsBlob: IBlob; |
710 |
|
function GetAsArray: IArray; |
711 |
|
function GetAsBCD: tBCD; |
712 |
< |
function GetStatement: IStatement; |
674 |
< |
function GetTransaction: ITransaction; |
712 |
> |
function GetAsNumeric: IFBNumeric; |
713 |
|
procedure Clear; |
714 |
|
function GetModified: boolean; |
715 |
|
procedure SetAsBoolean(AValue: boolean); |
738 |
|
procedure SetAsQuad(aValue: TISC_QUAD); |
739 |
|
procedure SetCharSetID(aValue: cardinal); |
740 |
|
procedure SetAsBcd(aValue: tBCD); |
741 |
+ |
procedure SetAsNumeric(Value: IFBNumeric); |
742 |
|
property AsDate: TDateTime read GetAsDateTime write SetAsDate; |
743 |
|
property AsBoolean:boolean read GetAsBoolean write SetAsBoolean; |
744 |
|
property AsTime: TDateTime read GetAsDateTime write SetAsTime; |
756 |
|
property AsBlob: IBlob read GetAsBlob write SetAsBlob; |
757 |
|
property AsArray: IArray read GetAsArray write SetAsArray; |
758 |
|
property AsBCD: tBCD read GetAsBCD write SetAsBCD; |
759 |
+ |
property AsNumeric: IFBNumeric read GetAsNumeric write SetAsNumeric; |
760 |
|
property AsQuad: TISC_QUAD read GetAsQuad write SetAsQuad; |
761 |
|
property Value: Variant read GetAsVariant write SetAsVariant; |
762 |
|
property IsNull: Boolean read GetIsNull write SetIsNull; |
763 |
|
property IsNullable: Boolean read GetIsNullable; |
764 |
|
property Modified: Boolean read getModified; |
765 |
|
property Name: AnsiString read GetName; |
726 |
– |
property SQLType: cardinal read GetSQLType; |
766 |
|
end; |
767 |
|
|
768 |
|
{ |
777 |
|
function ByName(Idx: AnsiString): ISQLParam ; |
778 |
|
function GetModified: Boolean; |
779 |
|
function GetHasCaseSensitiveParams: Boolean; |
780 |
+ |
function GetStatement: IStatement; |
781 |
+ |
function GetTransaction: ITransaction; |
782 |
+ |
function GetAttachment: IAttachment; |
783 |
+ |
procedure Clear; |
784 |
|
property Modified: Boolean read GetModified; |
785 |
|
property Params[index: integer]: ISQLParam read getSQLParam; default; |
786 |
|
property Count: integer read getCount; |
810 |
|
initially prepared. The interface is returned from the IAttachment interface. |
811 |
|
} |
812 |
|
|
813 |
+ |
TStatementFlag = (stHasCursor,stRepeatExecute,stScrollable); |
814 |
+ |
TStatementFlags = set of TStatementFlag; |
815 |
+ |
|
816 |
|
IStatement = interface |
817 |
|
['{a260576d-a07d-4a66-b02d-1b72543fd7cf}'] |
818 |
|
function GetMetaData: IMetaData; {Output Metadata} |
824 |
|
function GetSQLText: AnsiString; |
825 |
|
function GetProcessedSQLText: AnsiString; |
826 |
|
function GetSQLDialect: integer; |
827 |
+ |
function GetFlags: TStatementFlags; |
828 |
|
function IsPrepared: boolean; |
829 |
|
function HasBatchMode: boolean; |
830 |
|
function IsInBatchMode: boolean; |
831 |
< |
procedure Prepare(aTransaction: ITransaction=nil); |
831 |
> |
procedure Prepare(aTransaction: ITransaction=nil); overload; |
832 |
> |
procedure Prepare(CursorName: AnsiString; aTransaction: ITransaction=nil); overload; |
833 |
|
function Execute(aTransaction: ITransaction=nil): IResults; |
834 |
< |
function OpenCursor(aTransaction: ITransaction=nil): IResultSet; |
834 |
> |
function OpenCursor(aTransaction: ITransaction=nil): IResultSet; overload; |
835 |
> |
function OpenCursor(Scrollable: boolean; aTransaction: ITransaction=nil): IResultSet; overload; |
836 |
|
function GetAttachment: IAttachment; |
837 |
|
function GetTransaction: ITransaction; |
838 |
|
procedure SetRetainInterfaces(aValue: boolean); |
854 |
|
property SQLStatementType: TIBSQLStatementTypes read GetSQLStatementType; |
855 |
|
end; |
856 |
|
|
857 |
+ |
ITrInfoItem = interface |
858 |
+ |
['{41455e1a-f84e-4e26-aff0-1a78e8b69cfe}'] |
859 |
+ |
function getItemType: byte; |
860 |
+ |
function getSize: integer; |
861 |
+ |
function getAsString: AnsiString; |
862 |
+ |
function getAsInteger: int64; |
863 |
+ |
procedure DecodeTraIsolation(var IsolationType, RecVersion: byte); |
864 |
+ |
end; |
865 |
+ |
|
866 |
+ |
{ ITrInformation } |
867 |
+ |
|
868 |
+ |
ITrInformation = interface |
869 |
+ |
['{e6ea4a52-c1a1-44ba-9609-c8bcc7cba7b2}'] |
870 |
+ |
function GetCount: integer; |
871 |
+ |
function GetItem(index: integer): ITrInfoItem; |
872 |
+ |
function Find(ItemType: byte): ITrInfoItem; |
873 |
+ |
procedure PrintBuf; {can be used to print buffer in hex for debugging} |
874 |
+ |
property Count: integer read GetCount; |
875 |
+ |
property Items[index: integer]: ITrInfoItem read getItem; default; |
876 |
+ |
end; |
877 |
+ |
|
878 |
|
{Transaction Parameter Block: (TPB) |
879 |
|
|
880 |
|
The TPB provides the parameters used when starting a transaction. It is allocated |
888 |
|
|
889 |
|
ITPBItem = interface(IParameterBlockItemWithTypeName) |
890 |
|
['{544c1f2b-7c12-4a87-a4a5-face7ea72671}'] |
821 |
– |
function getParamTypeName: AnsiString; |
891 |
|
end; |
892 |
|
|
893 |
|
ITPB = interface(IParameterBlockWithTypeNames<ITPBItem>) |
894 |
|
['{7369b0ff-defe-437b-81fe-19b211d42d25}'] |
895 |
+ |
function AsText: AnsiString; |
896 |
|
end; |
897 |
|
|
898 |
|
{The ITransactionAction interface provides access to a Transaction once it |
911 |
|
function getTPB: ITPB; |
912 |
|
procedure Start(DefaultCompletion: TTransactionCompletion=taCommit); |
913 |
|
function GetInTransaction: boolean; |
914 |
+ |
function GetIsReadOnly: boolean; |
915 |
+ |
function GetTransactionID: integer; |
916 |
+ |
function GetJournalingActive(attachment: IAttachment): boolean; |
917 |
+ |
function GetDefaultCompletion: TTransactionCompletion; |
918 |
|
procedure PrepareForCommit; {Two phase commit - stage 1} |
919 |
|
procedure Commit(Force: boolean=false); |
920 |
|
procedure CommitRetaining; |
923 |
|
procedure RollbackRetaining; |
924 |
|
function GetAttachmentCount: integer; |
925 |
|
function GetAttachment(index: integer): IAttachment; |
926 |
+ |
function GetTrInformation(Requests: array of byte): ITrInformation; overload; |
927 |
+ |
function GetTrInformation(Request: byte): ITrInformation; overload; |
928 |
+ |
function GetTransactionName: AnsiString; |
929 |
+ |
procedure SetTransactionName(aValue: AnsiString); |
930 |
|
property InTransaction: boolean read GetInTransaction; |
931 |
+ |
property TransactionName: AnsiString read GetTransactionName write SetTransactionName; |
932 |
|
end; |
933 |
|
|
934 |
|
{ The IEvents Interface is used to handle events from a single database. The |
958 |
|
['{6a0be233-ed08-4524-889c-2e45d0c20e5f}'] |
959 |
|
procedure GetEvents(EventNames: TStrings); |
960 |
|
procedure SetEvents(EventNames: TStrings); overload; |
961 |
< |
procedure SetEvents(EventName: AnsiString); overload; |
961 |
> |
procedure SetEvents(EventName: string); overload; |
962 |
|
procedure Cancel; |
963 |
|
function ExtractEventCounts: TEventCounts; |
964 |
|
procedure WaitForEvent; |
1091 |
|
['{e676067b-1cf4-4eba-9256-9724f57e0d16}'] |
1092 |
|
end; |
1093 |
|
|
1094 |
+ |
{Journaling options. Default is [joReadWriteTransactions,joModifyQueries] } |
1095 |
+ |
|
1096 |
+ |
TJournalOption = (joReadOnlyTransactions, joReadWriteTransactions, |
1097 |
+ |
joModifyQueries, joReadOnlyQueries,joNoServerTable); |
1098 |
+ |
|
1099 |
+ |
TJournalOptions = set of TJournalOption; |
1100 |
+ |
|
1101 |
|
{The IAttachment interface provides access to a Database Connection. It may be |
1102 |
|
used to: |
1103 |
|
|
1135 |
|
procedure Disconnect(Force: boolean=false); |
1136 |
|
function IsConnected: boolean; |
1137 |
|
procedure DropDatabase; |
1138 |
< |
function StartTransaction(TPB: array of byte; DefaultCompletion: TTransactionCompletion=taCommit): ITransaction; overload; |
1139 |
< |
function StartTransaction(TPB: ITPB; DefaultCompletion: TTransactionCompletion=taCommit): ITransaction; overload; |
1138 |
> |
function StartTransaction(TPB: array of byte; |
1139 |
> |
DefaultCompletion: TTransactionCompletion=taCommit; |
1140 |
> |
aName: AnsiString=''): ITransaction; overload; |
1141 |
> |
function StartTransaction(TPB: ITPB; |
1142 |
> |
DefaultCompletion: TTransactionCompletion=taCommit; |
1143 |
> |
aName: AnsiString=''): ITransaction; overload; |
1144 |
|
procedure ExecImmediate(transaction: ITransaction; sql: AnsiString; SQLDialect: integer); overload; |
1145 |
|
procedure ExecImmediate(TPB: array of byte; sql: AnsiString; SQLDialect: integer); overload; |
1146 |
|
procedure ExecImmediate(transaction: ITransaction; sql: AnsiString); overload; |
1149 |
|
function ExecuteSQL(transaction: ITransaction; sql: AnsiString; SQLDialect: integer; params: array of const): IResults; overload; |
1150 |
|
function ExecuteSQL(TPB: array of byte; sql: AnsiString; params: array of const): IResults; overload; |
1151 |
|
function ExecuteSQL(transaction: ITransaction; sql: AnsiString; params: array of const): IResults; overload; |
1062 |
– |
function OpenCursor(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer): IResultSet; overload; |
1152 |
|
function OpenCursor(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; |
1153 |
+ |
Scrollable: boolean=false): IResultSet; overload; |
1154 |
+ |
function OpenCursor(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; |
1155 |
+ |
params: array of const): IResultSet; overload; |
1156 |
+ |
function OpenCursor(transaction: ITransaction; sql: AnsiString; Scrollable: boolean=false): IResultSet; overload; |
1157 |
+ |
function OpenCursor(transaction: ITransaction; sql: AnsiString; Scrollable: boolean; |
1158 |
|
params: array of const): IResultSet; overload; |
1065 |
– |
function OpenCursor(transaction: ITransaction; sql: AnsiString): IResultSet; overload; |
1159 |
|
function OpenCursor(transaction: ITransaction; sql: AnsiString; |
1160 |
|
params: array of const): IResultSet; overload; |
1161 |
< |
function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer): IResultSet; overload; |
1161 |
> |
function OpenCursor(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; Scrollable: boolean; |
1162 |
> |
params: array of const): IResultSet; overload; |
1163 |
|
function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; |
1164 |
+ |
Scrollable: boolean=false): IResultSet; overload; |
1165 |
+ |
function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; |
1166 |
+ |
params: array of const): IResultSet; overload; |
1167 |
+ |
function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; Scrollable: boolean; |
1168 |
|
params: array of const): IResultSet; overload; |
1169 |
< |
function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString): IResultSet; overload; |
1169 |
> |
function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; Scrollable: boolean=false): IResultSet; overload; |
1170 |
|
function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; |
1171 |
|
params: array of const): IResultSet; overload; |
1172 |
< |
function OpenCursorAtStart(sql: AnsiString): IResultSet; overload; |
1172 |
> |
function OpenCursorAtStart(transaction: ITransaction; sql: AnsiString; Scrollable: boolean; |
1173 |
> |
params: array of const): IResultSet; overload; |
1174 |
> |
function OpenCursorAtStart(sql: AnsiString; Scrollable: boolean=false): IResultSet; overload; |
1175 |
> |
function OpenCursorAtStart(sql: AnsiString; Scrollable: boolean; |
1176 |
> |
params: array of const): IResultSet; overload; |
1177 |
|
function OpenCursorAtStart(sql: AnsiString; |
1178 |
|
params: array of const): IResultSet; overload; |
1179 |
< |
function Prepare(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer): IStatement; overload; |
1180 |
< |
function Prepare(transaction: ITransaction; sql: AnsiString): IStatement; overload; |
1179 |
> |
function Prepare(transaction: ITransaction; sql: AnsiString; aSQLDialect: integer; CursorName: AnsiString=''): IStatement; overload; |
1180 |
> |
function Prepare(transaction: ITransaction; sql: AnsiString; CursorName: AnsiString=''): IStatement; overload; |
1181 |
|
function PrepareWithNamedParameters(transaction: ITransaction; sql: AnsiString; |
1182 |
|
aSQLDialect: integer; GenerateParamNames: boolean=false; |
1183 |
< |
CaseSensitiveParams: boolean = false): IStatement; overload; |
1183 |
> |
CaseSensitiveParams: boolean = false; CursorName: AnsiString=''): IStatement; overload; |
1184 |
|
function PrepareWithNamedParameters(transaction: ITransaction; sql: AnsiString; |
1185 |
|
GenerateParamNames: boolean=false; |
1186 |
< |
CaseSensitiveParams: boolean = false): IStatement; overload; |
1186 |
> |
CaseSensitiveParams: boolean = false; CursorName: AnsiString=''): IStatement; overload; |
1187 |
|
|
1188 |
|
{Events} |
1189 |
|
function GetEventHandler(Events: TStrings): IEvents; overload; |
1211 |
|
|
1212 |
|
{Database Information} |
1213 |
|
function GetSQLDialect: integer; |
1214 |
+ |
function GetAttachmentID: integer; |
1215 |
|
function GetBlobMetaData(Transaction: ITransaction; tableName, columnName: AnsiString): IBlobMetaData; |
1216 |
|
function GetArrayMetaData(Transaction: ITransaction; tableName, columnName: AnsiString): IArrayMetaData; |
1217 |
|
function GetDBInformation(Requests: array of byte): IDBInformation; overload; |
1227 |
|
function HasActivity: boolean; |
1228 |
|
function HasDecFloatSupport: boolean; |
1229 |
|
function HasBatchMode: boolean; |
1230 |
+ |
function HasScollableCursors: boolean; |
1231 |
+ |
function HasTable(aTableName: AnsiString): boolean; {case sensitive} |
1232 |
+ |
function HasFunction(aFunctionName: AnsiString): boolean; {case sensitive} |
1233 |
+ |
function HasProcedure(aProcName: AnsiString): boolean; {case sensitive} |
1234 |
|
|
1235 |
|
{Character Sets} |
1236 |
+ |
function GetCharSetID: integer; {connection character set} |
1237 |
|
function HasDefaultCharSet: boolean; |
1238 |
|
function GetDefaultCharSetID: integer; |
1239 |
|
function GetCharsetName(CharSetID: integer): AnsiString; |
1247 |
|
{Time Zone Database} |
1248 |
|
function GetTimeZoneServices: ITimeZoneServices; |
1249 |
|
function HasTimeZoneSupport: boolean; |
1250 |
+ |
|
1251 |
+ |
{Client side Journaling} |
1252 |
+ |
function JournalingActive: boolean; |
1253 |
+ |
function GetJournalOptions: TJournalOptions; |
1254 |
+ |
function StartJournaling(aJournalLogFile: AnsiString): integer; overload; |
1255 |
+ |
function StartJournaling(aJournalLogFile: AnsiString; Options: TJournalOptions): integer; overload; |
1256 |
+ |
function StartJournaling(S: TStream; Options: TJournalOptions): integer; overload; |
1257 |
+ |
procedure StopJournaling(RetainJournal: boolean); |
1258 |
|
end; |
1259 |
|
|
1260 |
|
TProtocolAll = (TCP, SPX, NamedPipe, Local, inet, inet4, inet6, wnet, xnet, unknownProtocol); |
1423 |
|
{Start Transaction against multiple databases} |
1424 |
|
function AllocateTPB: ITPB; |
1425 |
|
function StartTransaction(Attachments: array of IAttachment; |
1426 |
< |
TPB: array of byte; DefaultCompletion: TTransactionCompletion=taCommit): ITransaction; overload; |
1426 |
> |
TPB: array of byte; DefaultCompletion: TTransactionCompletion=taCommit; |
1427 |
> |
aName: AnsiString=''): ITransaction; overload; |
1428 |
|
function StartTransaction(Attachments: array of IAttachment; |
1429 |
< |
TPB: ITPB; DefaultCompletion: TTransactionCompletion=taCommit): ITransaction; overload; |
1429 |
> |
TPB: ITPB; DefaultCompletion: TTransactionCompletion=taCommit; |
1430 |
> |
aName: AnsiString=''): ITransaction; overload; |
1431 |
|
|
1432 |
|
{Service Manager} |
1433 |
|
function HasServiceAPI: boolean; |
1476 |
|
EIBInterBaseError = class(EIBError) |
1477 |
|
private |
1478 |
|
FIBErrorCode: Long; |
1479 |
+ |
FStatus: IStatus; |
1480 |
|
public |
1481 |
< |
constructor Create(Status: IStatus); overload; |
1481 |
> |
constructor Create(aStatus: IStatus); overload; |
1482 |
|
constructor Create(ASQLCode: Long; AIBErrorCode: Long; Msg: AnsiString); overload; |
1483 |
|
property IBErrorCode: Long read FIBErrorCode; |
1484 |
+ |
property Status: IStatus read FStatus; |
1485 |
|
end; |
1486 |
|
|
1487 |
|
{IB Client Exceptions} |
1510 |
|
|
1511 |
|
function LoadFBLibrary(aLibPathName: string): IFirebirdLibrary; |
1512 |
|
|
1513 |
+ |
{$if not declared(Null)} {Needed for Delphi} |
1514 |
+ |
function Null: Variant; // Null standard constant |
1515 |
+ |
{$define NEEDNULLFUNCTION} |
1516 |
+ |
{$ifend} |
1517 |
|
|
1518 |
|
implementation |
1519 |
|
|
1520 |
< |
uses FBClientAPI |
1520 |
> |
uses FBClientAPI {$if not declared(NULL)}, Variants {$ifend} |
1521 |
|
{$IFDEF USELEGACYFIREBIRDAPI}, FB25ClientAPI {$ENDIF} |
1522 |
|
{$IFDEF USEFIREBIRD3API}, FB30ClientAPI {$ENDIF}; |
1523 |
|
|
1609 |
|
|
1610 |
|
{ EIBInterBaseError } |
1611 |
|
|
1612 |
< |
constructor EIBInterBaseError.Create(Status: IStatus); |
1612 |
> |
constructor EIBInterBaseError.Create(aStatus: IStatus); |
1613 |
|
begin |
1614 |
< |
inherited Create(Status.Getsqlcode,Status.GetMessage); |
1615 |
< |
FIBErrorCode := Status.GetIBErrorCode; |
1614 |
> |
inherited Create(aStatus.Getsqlcode,aStatus.GetMessage); |
1615 |
> |
FIBErrorCode := aStatus.GetIBErrorCode; |
1616 |
> |
FStatus := aStatus; |
1617 |
|
end; |
1618 |
|
|
1619 |
|
constructor EIBInterBaseError.Create(ASQLCode: Long; AIBErrorCode: Long; |
1623 |
|
FIBErrorCode := AIBErrorCode; |
1624 |
|
end; |
1625 |
|
|
1626 |
+ |
{$ifdef NEEDNULLFUNCTION} |
1627 |
+ |
function Null: Variant; // Null standard constant |
1628 |
+ |
begin |
1629 |
+ |
VarClearProc(TVarData(Result)); |
1630 |
+ |
TVarData(Result).VType := varnull; |
1631 |
+ |
end; |
1632 |
+ |
{$endif} |
1633 |
|
|
1634 |
|
initialization |
1635 |
|
FDefaultFBLibrary := nil; |