本人是个菜鸟,最近因毕业设计要编一个题库,在编登陆窗口是遇到以下困难,请各位高手帮忙指导一下,谢谢!
unit Unitdenglu;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, DB, DBTables, Buttons, Mask, DBCtrls;type
Tdenglu = class(TForm)
Query1: TQuery;
Edit1: TEdit;
Edit2: TEdit;
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
denglu: Tdenglu;implementationuses UnitRYGL, UnitHYSY;{$R *.dfm}
procedure Tdenglu.Button1Click(Sender: TObject);
var
right:string; begin
if (Edit1.Text='')or(Edit2.Text='') then
begin
showmessage('用户名或口令为空');
exit;
end
else begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from GLYname where Username='+''''+Edit1.Text+''''+
' and password='+''''+Edit2.Text+'''');
query1.Open;
if query1.RecordCount=1 then
begin
right:=query1.fieldbyname('rright').AsString;
RYGL.Enabled:=true;
Edit1.Clear;
Edit2.Clear;
close;
end
else
begin
showmessage('用户名和口令有误');
Edit1.SetFocus;
end;
end;
end;procedure Tdenglu.Button2Click(Sender: TObject);
begin
denglu.Close;
HYSY.Show;end;end.
一样是登陆窗口的源程序,表的名称是GLYname,是用paradox7建的,有两个字段,Username(A)和password(A),前一个是keyword,运行后出现以下错误提示:Project ProjectNDG.exe raised exception class EDBEngineError with message'Invalid use of keyword
Token:password='123456'
Line Number:1'.Process stopped. Use Step or Run to continue
其中123456是我输入的密码,请问各位大侠我的程序那里有问题,并给些知道,谢谢谢谢!!!
unit Unitdenglu;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, DB, DBTables, Buttons, Mask, DBCtrls;type
Tdenglu = class(TForm)
Query1: TQuery;
Edit1: TEdit;
Edit2: TEdit;
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
denglu: Tdenglu;implementationuses UnitRYGL, UnitHYSY;{$R *.dfm}
procedure Tdenglu.Button1Click(Sender: TObject);
var
right:string; begin
if (Edit1.Text='')or(Edit2.Text='') then
begin
showmessage('用户名或口令为空');
exit;
end
else begin
query1.Close;
query1.SQL.Clear;
query1.SQL.Add('select * from GLYname where Username='+''''+Edit1.Text+''''+
' and password='+''''+Edit2.Text+'''');
query1.Open;
if query1.RecordCount=1 then
begin
right:=query1.fieldbyname('rright').AsString;
RYGL.Enabled:=true;
Edit1.Clear;
Edit2.Clear;
close;
end
else
begin
showmessage('用户名和口令有误');
Edit1.SetFocus;
end;
end;
end;procedure Tdenglu.Button2Click(Sender: TObject);
begin
denglu.Close;
HYSY.Show;end;end.
一样是登陆窗口的源程序,表的名称是GLYname,是用paradox7建的,有两个字段,Username(A)和password(A),前一个是keyword,运行后出现以下错误提示:Project ProjectNDG.exe raised exception class EDBEngineError with message'Invalid use of keyword
Token:password='123456'
Line Number:1'.Process stopped. Use Step or Run to continue
其中123456是我输入的密码,请问各位大侠我的程序那里有问题,并给些知道,谢谢谢谢!!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货