Fix bug #613 Target database not remembered in Export window

This commit is contained in:
Ansgar Becker
2008-08-26 19:38:49 +00:00
parent cd6e4024a6
commit 8367deb592
2 changed files with 9 additions and 1 deletions

View File

@@ -142,6 +142,7 @@ const
REGNAME_EXP_OUTFILE = 'exportfilename';
REGNAME_EXP_OUTDIR = 'ExportDirectory';
REGNAME_EXP_TARGET = 'ExportSQL_OutputTo';
REGNAME_EXP_DESTDB = 'ExportSQL_DestDB';
REGNAME_EXP_WINWIDTH = 'ExportSQL_WindowWidth';
REGNAME_EXP_WINHEIGHT = 'ExportSQL_WindowHeight';
REGNAME_CSV_SEPARATOR = 'CSVSeparator';

View File

@@ -1210,10 +1210,16 @@ begin
end;
procedure TExportSQLForm.fillcombo_anotherdb(Sender: TObject);
var
lastdb: WideString;
begin
comboOtherDatabase.Items := comboSelectDatabase.Items;
comboOtherDatabase.Items.delete(comboSelectDatabase.ItemIndex);
if comboOtherDatabase.ItemIndex = -1 then
if comboOtherDatabase.ItemIndex = -1 then begin
lastdb := Utf8Decode(Mainform.GetRegValue(REGNAME_EXP_DESTDB, ''));
comboOtherDatabase.ItemIndex := comboOtherDatabase.Items.IndexOf(lastdb);
end;
if (comboOtherDatabase.ItemIndex = -1) and (comboOtherDatabase.Items.Count > 0) then
comboOtherDatabase.ItemIndex := 0;
end;
@@ -1514,6 +1520,7 @@ begin
else if radioOtherHost.checked then
OutputTo := OUTPUT_HOST;
WriteInteger(REGNAME_EXP_TARGET, OutputTo );
WriteString(REGNAME_EXP_DESTDB, Utf8Encode(comboOtherDatabase.Text));
WriteInteger(REGNAME_EXP_WINWIDTH, Width );
WriteInteger(REGNAME_EXP_WINHEIGHT, Height );
CloseKey();