📄 unit8.pas
字号:
unit Unit8;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, Buttons;
type
TForm8 = class(TForm)
BitBtn1: TBitBtn;
Savefile: TSaveDialog;
returnmain: TBitBtn;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form8: TForm8;
implementation
{$R *.dfm}
uses Unit2;
procedure TForm8.FormClose(Sender: TObject; var Action: TCloseAction);
begin
application.Terminate;
end;
procedure TForm8.BitBtn1Click(Sender: TObject);
begin
if savefile.Execute then //使用Save Dialog组件
begin
with mydata.Query1 do
begin
close;
with sql do
begin
//添加进行数据库备份的SQL语句
add('backup database 人事管理系统 to disk=:path');
//获取从Save Dialog的路径名,然后将其赋值给SQL语句
ParamByName('path').AsString:=savefile.FileName;
end;
execsql;
end;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -