48 |
|
TFB30ServiceManager = class(TFBServiceManager,IServiceManager) |
49 |
|
private |
50 |
|
FServiceIntf: Firebird.IService; |
51 |
+ |
FFirebird30ClientAPI: TFB30ClientAPI; |
52 |
|
procedure CheckActive; |
53 |
|
procedure CheckInactive; |
54 |
|
protected |
55 |
|
procedure InternalAttach(ConnectString: AnsiString); override; |
56 |
|
public |
57 |
+ |
constructor Create(api: TFB30ClientAPI; ServerName: AnsiString; Protocol: TProtocol; SPB: ISPB; Port: AnsiString = ''); |
58 |
|
property ServiceIntf: Firebird.IService read FServiceIntf; |
59 |
|
|
60 |
|
public |
85 |
|
|
86 |
|
procedure TFB30ServiceManager.InternalAttach(ConnectString: AnsiString); |
87 |
|
begin |
88 |
< |
with Firebird30ClientAPI do |
88 |
> |
with FFirebird30ClientAPI do |
89 |
|
if FSPB = nil then |
90 |
|
begin |
91 |
|
FServiceIntf := ProviderIntf.attachServiceManager(StatusIntf, PAnsiChar(ConnectString), 0, nil); |
101 |
|
end; |
102 |
|
end; |
103 |
|
|
104 |
+ |
constructor TFB30ServiceManager.Create(api: TFB30ClientAPI; |
105 |
+ |
ServerName: AnsiString; Protocol: TProtocol; SPB: ISPB; Port: AnsiString); |
106 |
+ |
begin |
107 |
+ |
FFirebird30ClientAPI := api; |
108 |
+ |
inherited Create(api,ServerName, Protocol, SPB, Port); |
109 |
+ |
end; |
110 |
+ |
|
111 |
|
procedure TFB30ServiceManager.Detach(Force: boolean); |
112 |
|
begin |
113 |
|
if FServiceIntf = nil then |
114 |
|
Exit; |
115 |
< |
with Firebird30ClientAPI do |
115 |
> |
with FFirebird30ClientAPI do |
116 |
|
begin |
117 |
|
FServiceIntf.detach(StatusIntf); |
118 |
|
if not Force and InErrorState then |
131 |
|
begin |
132 |
|
Result := true; |
133 |
|
CheckActive; |
134 |
< |
with Firebird30ClientAPI do |
134 |
> |
with FFirebird30ClientAPI do |
135 |
|
begin |
136 |
|
FServiceIntf.Start(StatusIntf, |
137 |
|
(Request as TSRB).getDataLength, |
148 |
|
var QueryResults: TServiceQueryResults; |
149 |
|
begin |
150 |
|
CheckActive; |
151 |
< |
QueryResults := TServiceQueryResults.Create; |
151 |
> |
QueryResults := TServiceQueryResults.Create(FFirebird30ClientAPI); |
152 |
|
Result := QueryResults; |
153 |
< |
with Firebird30ClientAPI do |
153 |
> |
with FFirebird30ClientAPI do |
154 |
|
begin |
155 |
|
if SQPB <> nil then |
156 |
|
begin |