📄 unit4.~pas
字号:
unit Unit4;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, DB, ADODB;
type
TForm4 = class(TForm)
Panel1: TPanel;
GroupBox1: TGroupBox;
RadioButton1: TRadioButton;
GroupBox2: TGroupBox;
RadioButton2: TRadioButton;
GroupBox3: TGroupBox;
RadioButton3: TRadioButton;
GroupBox4: TGroupBox;
RadioButton4: TRadioButton;
Button1: TButton;
Button2: TButton;
ruler4Qry: TADOQuery;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form4: TForm4;
implementation
uses Unit7;
{$R *.dfm}
procedure TForm4.Button2Click(Sender: TObject);
begin
with ruler4Qry do
begin
close;
with sql do
begin
clear;
add('delete from fact_table');
end;
execsql;
end;
with ruler4Qry do
begin
close;
with sql do
begin
clear;
add('update pre_table set known=0 where known=1');
end;
execsql;
end;
with ruler4Qry do
begin
close;
with sql do
begin
clear;
add('update act_table set known=0 where known=1');
end;
execsql;
end;
Application.Terminate;
end;
procedure TForm4.Button1Click(Sender: TObject);
begin
ruler4Qry.Close;
//将事实加入事实库fact_table
if (radioButton1.Checked) then
begin
ruler4Qry.SQL.Clear;
ruler4Qry.sql.add('insert into fact_table values('+'24'+') ' );
ruler4Qry.ExecSQL;
end;
if (radioButton2.Checked) then
begin
ruler4Qry.SQL.Clear;
ruler4Qry.sql.add('insert into fact_table values('+'25'+') ' );
ruler4Qry.ExecSQL ;
end ;
if (radioButton3.Checked) then
begin
ruler4Qry.SQL.Clear;
ruler4Qry.sql.add('insert into fact_table values('+'26'+') ' );
ruler4Qry.ExecSQL;
end;
if (radioButton4.Checked) then
begin
ruler4Qry.SQL.Clear;
ruler4Qry.sql.add('insert into fact_table values('+'28'+') ' );
ruler4Qry.ExecSQL;
end;
Form4.Close;
Form7.show;
end;
procedure TForm4.FormShow(Sender: TObject);
begin
RadioButton1.Checked:=false;
RadioButton2.Checked:=false;
RadioButton3.Checked:=false;
RadioButton4.Checked:=false;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -