mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 01:56:36 +08:00
Revert unrelated changes from previous commit.
This commit is contained in:
@ -21,7 +21,7 @@ uses
|
||||
TntStdCtrls, Tabs, SynUnicode, EditVar, helpers,
|
||||
createdatabase, table_editor, SynRegExpr,
|
||||
WideStrUtils, ExtActns, CommCtrl, routine_editor, options,
|
||||
Contnrs, PngSpeedButton, connections, SynEditKeyCmds,
|
||||
Contnrs, PngSpeedButton, connections, SynEditKeyCmds, exportsql,
|
||||
mysql_connection, mysql_api;
|
||||
|
||||
|
||||
@ -483,6 +483,7 @@ type
|
||||
procedure actExecuteLineExecute(Sender: TObject);
|
||||
procedure actHTMLviewExecute(Sender: TObject);
|
||||
procedure actInsertFilesExecute(Sender: TObject);
|
||||
procedure actExportTablesExecute(Sender: TObject);
|
||||
procedure actDataDeleteExecute(Sender: TObject);
|
||||
procedure actDataFirstExecute(Sender: TObject);
|
||||
procedure actDataInsertExecute(Sender: TObject);
|
||||
@ -792,6 +793,7 @@ type
|
||||
prefNullColorDefault,
|
||||
prefNullBG : TColor;
|
||||
CreateDatabaseForm : TCreateDatabaseForm;
|
||||
ExportSQLForm : TExportSQLForm;
|
||||
TableEditor : TfrmTableEditor;
|
||||
FDataGridSelect : WideStrings.TWideStringList;
|
||||
FDataGridSort : TOrderColArray;
|
||||
@ -1810,11 +1812,9 @@ begin
|
||||
else
|
||||
TableToolsDialog.SelectedTables.Clear;
|
||||
if Sender = actMaintenance then
|
||||
TableToolsDialog.ToolMode := tmMaintenance
|
||||
else if Sender = actFindTextOnServer then
|
||||
TableToolsDialog.ToolMode := tmFind
|
||||
else if Sender = actExportTables then
|
||||
TableToolsDialog.ToolMode := tmSQLExport;
|
||||
TableToolsDialog.PageControlTools.ActivePage := TableToolsDialog.tabMaintenance
|
||||
else
|
||||
TableToolsDialog.PageControlTools.ActivePage := TableToolsDialog.tabFind;
|
||||
TableToolsDialog.ShowModal;
|
||||
end;
|
||||
|
||||
@ -2168,6 +2168,36 @@ begin
|
||||
InsertFilesWindow(Self);
|
||||
end;
|
||||
|
||||
procedure TMainForm.actExportTablesExecute(Sender: TObject);
|
||||
var
|
||||
Results: TMySQLQuery;
|
||||
InDBTree: Boolean;
|
||||
Comp: TComponent;
|
||||
begin
|
||||
ExportSQLForm := TExportSQLForm.Create(Self);
|
||||
|
||||
// popupDB is used in DBTree AND ListTables
|
||||
InDBTree := False;
|
||||
Comp := (Sender as TAction).ActionComponent;
|
||||
if Comp is TMenuItem then
|
||||
InDBTree := TPopupMenu((Comp as TMenuItem).GetParentMenu).PopupComponent = DBTree;
|
||||
if InDBTree then begin
|
||||
// If a table is selected, use that for preselection. If only a db was selected, use all tables inside it.
|
||||
if SelectedTable.Text <> '' then
|
||||
ExportSQLForm.SelectedTables.Add(SelectedTable.Text)
|
||||
else if Mainform.ActiveDatabase <> '' then begin
|
||||
Results := Mainform.FetchDbTableList(ActiveDatabase);
|
||||
while not Results.Eof do begin
|
||||
ExportSQLForm.SelectedTables.Add(Results.Col(DBO_NAME));
|
||||
Results.Next;
|
||||
end;
|
||||
end;
|
||||
end else
|
||||
ExportSQLForm.SelectedTables := GetVTCaptions( Mainform.ListTables, True );
|
||||
|
||||
ExportSQLForm.ShowModal;
|
||||
end;
|
||||
|
||||
// Drop Table(s)
|
||||
procedure TMainForm.actDropObjectsExecute(Sender: TObject);
|
||||
var
|
||||
@ -3967,7 +3997,6 @@ begin
|
||||
except
|
||||
on E:Exception do begin
|
||||
if actQueryStopOnErrors.Checked or (i = SQL.Count - 1) then begin
|
||||
raise;
|
||||
Screen.Cursor := crDefault;
|
||||
MessageDlg( E.Message, mtError, [mbOK], 0 );
|
||||
Break;
|
||||
@ -8960,6 +8989,8 @@ begin
|
||||
Editors.Add(SQLHelpForm.memoDescription);
|
||||
Editors.Add(SQLHelpForm.MemoExample);
|
||||
end;
|
||||
if Assigned(ExportSQLForm) then
|
||||
Editors.Add(ExportSQLForm.SynMemoExampleSQL);
|
||||
|
||||
FontName := GetRegValue(REGNAME_FONTNAME, DEFAULT_FONTNAME);
|
||||
FontSize := GetRegValue(REGNAME_FONTSIZE, DEFAULT_FONTSIZE);
|
||||
|
Reference in New Issue
Block a user