我做的是个登陆系统,谁帮我看下怎么改,另外就是TTABLE怎么连接数据库(50分)

  • 主题发起人 主题发起人 tanbo23456
  • 开始时间 开始时间
T

tanbo23456

Unregistered / Unconfirmed
GUEST, unregistred user!
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, DBTables, Buttons;

type
TForm1 = class(TForm)
PRIV: TTable;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
procedure OK1(Sender: TObject);
procedure exit1Click(Sender: TObject);
procedure FormCreat(Sender: TObject);
procedure Edit2KeyPress(Sender: TObject;var Ker:Char);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
count:integer

implementation

{$R *.dfm}

procedure TForm1.OK1Click(Sender: TObject);
var
results:variant;
begin
count:=count+1;
results:=table1.lookup('name',edit1.text,'passward');
if result=edit2.Text then
showmessage('cheng')
else
begin
showmessage('cuowu' );
if(count=3) then
close;
end;
end;

procedure TForm1.Edit2Change(Sender: TObject);
begin
if(key=#13)then
0k1.Click
else
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
table.Active:=true;
count:=0
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
close
end;

end.
 
什么错误都不说?先学会怎么问问题啊.
 
你问的什么问题啊
 
数据库连接有问题
 
接受答案了.
 
后退
顶部