I had to revert a database from FB2.5 Dialect 3 to FB1.5 Dialect 1.
I couldn't find any switch to do that so I took the source and hardcoded it.
It would be nice to have that switch as another option and if omited a default
value of 3.
I've set the dialect option in here:
[code]
function TCloner.Clone(const Source, Target: TDatabase): Boolean;
...
{$IFDEF BENCH}
Perfs.duration.Start;
{$ENDIF}
Result := true;
FErrorsCount := 0;
SrcDatabase := TUIBDataBase.Create(nil);
Source.Configure(SrcDatabase);
SrcDatabase.Params.Add('no_garbage_collect');
try
{$IFDEF BENCH}
Perfs.source_connection.Start;
{$ENDIF}
SrcDatabase.Connected := true;
{$IFDEF BENCH}
Perfs.source_connection.Stop;
{$ENDIF}
AddLog('Source connection'
+ #13#10 + ' Database %s'
+ #13#10 + ' Username %s'
+ #13#10 + ' Page Size %d'
+ #13#10 + ' Client %s'
{$IFDEF FB102_UP}
+ #13#10 + ' Server %s'
{$ENDIF},
[
Source.ConnectionString,
Source.Username,
SrcDatabase.InfoPageSize,
SrcDatabase.InfoVersion
{$IFDEF FB102_UP}
,SrcDatabase.InfoFirebirdVersion
{$ENDIF}
]
);
except
on E: EUIBError do
begin
AddLog('Cannot connect source database %s' + #13#10 +
'%s', [Source.ConnectionString, E.Message], llError);
Exit;
end;
end;
DstDatabase := TUIBDataBase.Create(nil);
Target.Configure(DstDatabase);
// Hardcoded Dialect --------
DstDatabase.SQLDialect := 1;
// --------------------------
DstDatabase.Params.Add('num_buffers=50');
...
[/code]
Original issue reported on code.google.com by duiliois...@gmail.com on 18 Feb 2013 at 4:05
Original issue reported on code.google.com by
duiliois...@gmail.com
on 18 Feb 2013 at 4:05