unit Unit2;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, DBTables;type
Tlogin = class(TForm)
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Button2: TButton;
user: TEdit;
pwd: TEdit;
Table1: TTable;
private
{ Private declarations }
public
{ Public declarations }
function canPass:boolean;
end;var
login: Tlogin;implementation{$R *.dfm}function Tlogin.canPass: boolean;
begin
with table1 do
begin
setkey;
FieldByName('name').AsString :=user.Text;
FieldByName('password').AsString :=pwd.Text;
//table1['Name']:=user.Text;
//table1['PASSWORD']:=pwd.Text;
result:=gotokey;
end
end;end.
这个gotokey为什么无法正确返回?
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, DBTables;type
Tlogin = class(TForm)
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Button2: TButton;
user: TEdit;
pwd: TEdit;
Table1: TTable;
private
{ Private declarations }
public
{ Public declarations }
function canPass:boolean;
end;var
login: Tlogin;implementation{$R *.dfm}function Tlogin.canPass: boolean;
begin
with table1 do
begin
setkey;
FieldByName('name').AsString :=user.Text;
FieldByName('password').AsString :=pwd.Text;
//table1['Name']:=user.Text;
//table1['PASSWORD']:=pwd.Text;
result:=gotokey;
end
end;end.
这个gotokey为什么无法正确返回?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货