144 |
|
Disconnect; |
145 |
|
Connect; |
146 |
|
end |
147 |
– |
else |
148 |
– |
GetODSAndConnectionInfo; |
147 |
|
end; |
148 |
|
|
149 |
|
constructor TFB25Attachment.CreateDatabase(api: TFB25ClientAPI; sql: AnsiString; aSQLDialect: integer; |
152 |
|
begin |
153 |
|
inherited Create(api,'',nil,RaiseExceptionOnError); |
154 |
|
FFirebird25ClientAPI := api; |
155 |
< |
FSQLDialect := aSQLDialect; |
155 |
> |
SetSQLDialect(aSQLDialect); |
156 |
|
tr_handle := nil; |
157 |
|
with FFirebird25ClientAPI do |
158 |
|
begin |
161 |
|
IBDataBaseError; |
162 |
|
|
163 |
|
end; |
166 |
– |
GetODSAndConnectionInfo; |
164 |
|
ExtractConnectString(sql,FDatabaseName); |
165 |
|
DPBFromCreateSQL(sql); |
166 |
|
end; |
177 |
|
|
178 |
|
procedure TFB25Attachment.Connect; |
179 |
|
begin |
180 |
< |
FSQLDialect := 3; |
180 |
> |
SetSQLDialect(3); |
181 |
|
|
182 |
|
with FFirebird25ClientAPI do |
183 |
|
if DPB = nil then |
195 |
|
IBDatabaseError; |
196 |
|
|
197 |
|
end; |
201 |
– |
GetODSAndConnectionInfo; |
198 |
|
end; |
199 |
|
|
200 |
|
procedure TFB25Attachment.Disconnect(Force: boolean); |
209 |
|
if (isc_detach_database(StatusVector, @FHandle) > 0) and not Force then |
210 |
|
IBDatabaseError; |
211 |
|
FHandle := nil; |
216 |
– |
FHasDefaultCharSet := false; |
217 |
– |
FCodePage := CP_NONE; |
218 |
– |
FCharSetID := 0; |
212 |
|
end; |
213 |
|
|
214 |
|
function TFB25Attachment.IsConnected: boolean; |