以下代码的意思是什么?procedure FormClose(Sender: TObject; var Action: TCloseAction);private{ Private declarations }public{ Public declarations }end;varForm1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);begi
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/27 21:31:23
以下代码的意思是什么?procedure FormClose(Sender: TObject; var Action: TCloseAction);private{ Private declarations }public{ Public declarations }end;varForm1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);begi
以下代码的意思是什么?
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
with SQLConnection do
begin
Close;
Params.Values['HostName']:=HostName.Text;
Params.Values['UserName']:=User_Name.Text;
Params.Values['Password']:=Password.Text;
Params.Values['Database']:=Database.Text;
try
Connected:=True;
Statusbar1.Panels[0].Text:='Connect OK';
ButtonGo.Enabled:=True;
except
MessageDlg('Connect Error',mtError,[mbyes],0);
end;
end;
end;
procedure TForm1.ButtonGoClick(Sender: TObject);
begin
with SQLClientDataSet do
begin
Close;
CommandText:=ESQL.Text;
Open;
end;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
SQLConnection.Close;
end;
end.
我不明白的是user.text,password.text的内容怎么指定的?
以下代码的意思是什么?procedure FormClose(Sender: TObject; var Action: TCloseAction);private{ Private declarations }public{ Public declarations }end;varForm1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);begi
用户在界面中输入.