60 |
|
{ } |
61 |
|
{************************************************************************} |
62 |
|
unit FB25Services; |
63 |
+ |
{$IFDEF MSWINDOWS} |
64 |
+ |
{$DEFINE WINDOWS} |
65 |
+ |
{$ENDIF} |
66 |
|
|
67 |
|
{$IFDEF FPC} |
68 |
< |
{$mode objfpc}{$H+} |
68 |
> |
{$mode delphi} |
69 |
|
{$interfaces COM} |
70 |
|
{$ENDIF} |
71 |
|
|
84 |
|
procedure CheckActive; |
85 |
|
procedure CheckInactive; |
86 |
|
protected |
87 |
< |
procedure InternalAttach(ConnectString: string); override; |
87 |
> |
procedure InternalAttach(ConnectString: AnsiString); override; |
88 |
|
public |
89 |
|
property Handle: TISC_SVC_HANDLE read FHandle; |
90 |
|
|
114 |
|
IBError(ibxeServiceInActive, [nil]); |
115 |
|
end; |
116 |
|
|
117 |
< |
procedure TFB25ServiceManager.InternalAttach(ConnectString: String); |
117 |
> |
procedure TFB25ServiceManager.InternalAttach(ConnectString: AnsiString); |
118 |
|
begin |
119 |
|
with Firebird25ClientAPI do |
120 |
|
if FSPB = nil then |
121 |
|
begin |
122 |
|
if isc_service_attach(StatusVector, Length(ConnectString), |
123 |
< |
PChar(ConnectString), @FHandle, 0, nil) > 0 then |
123 |
> |
PAnsiChar(ConnectString), @FHandle, 0, nil) > 0 then |
124 |
|
IBDataBaseError; |
125 |
|
end |
126 |
|
else |
127 |
|
begin |
128 |
|
if isc_service_attach(StatusVector, Length(ConnectString), |
129 |
< |
PChar(ConnectString), @FHandle, |
129 |
> |
PAnsiChar(ConnectString), @FHandle, |
130 |
|
(FSPB as TSPB).getDataLength, |
131 |
|
(FSPB as TSPB).getBuffer) > 0 then |
132 |
|
IBDataBaseError; |