30 |
|
interface |
31 |
|
|
32 |
|
uses |
33 |
< |
Classes, SysUtils, LResources, Forms, Controls, Dialogs, IBXCustomIBLocalDBSupport; |
33 |
> |
Classes, SysUtils, LResources, Forms, Controls, Dialogs, IBXCustomIBLocalDBSupport, |
34 |
> |
IBXServices; |
35 |
|
|
36 |
|
type |
37 |
|
|
117 |
|
|
118 |
|
function TIBLocalDBSupport.InternalCreateNewDatabase(DBArchive: string |
119 |
|
): boolean; |
119 |
– |
var Ext: string; |
120 |
|
begin |
121 |
< |
Ext := AnsiUpperCase(ExtractFileExt(DBArchive)); |
122 |
< |
if Ext = '.GBK' then |
121 |
> |
if IsGBakFile(DBArchive) then |
122 |
|
begin |
123 |
|
Database.Attachment.Disconnect; |
124 |
|
try |
128 |
|
end; |
129 |
|
end |
130 |
|
else |
132 |
– |
if Ext = '.SQL' then |
131 |
|
Result := IBXCreateDatabaseFromSQLDlgUnit.CreateNewDatabase(Database,DBArchive) |
134 |
– |
else |
135 |
– |
raise Exception.CreateFmt('Archive file (%s) has an unknown extension',[DBArchive]); |
132 |
|
end; |
133 |
|
|
134 |
|
procedure TIBLocalDBSupport.Downgrade(DBArchive: string); |