unit user_inf_out;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, Grids, DBGrids, StdCtrls, Mask, DBCtrls, ExtCtrls;type
TForm5 = class(TForm)
Label1: TLabel;
RadioGroup1: TRadioGroup;
Button1: TButton;
DBGrid1: TDBGrid;
DataSource1: TDataSource;
ADOTable1: TADOTable;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form5: TForm5;implementation{$R *.dfm}procedure TForm5.Button1Click(Sender: TObject);
begin
if radiogroup1.ItemIndex<>-1 then
begin
case radiogroup1.ItemIndex of
0:begin
adotable1.Filtered :=false;
adotable1.Filter :='工号='+''''+edit1.Text+'''';
adotable1.Filtered :=true;
end;
1:begin
adotable1.Filtered :=false;
adotable1.Filter :='姓名='+''''+edit2.Text+'''';
adotable1.Filtered :=true;
end;
2:begin
adotable1.Filtered :=false;
adotable1.Filter :='部门编号='+''''+edit3.Text+'''';
adotable1.Filtered :=true;
end;
end;
end;end.编译时报错:[Error] user_inf_out.pas(56): Record, object or class type required
[Error] user_inf_out.pas(64): 'END' expected but end of file found
[Error] user_inf_out.pas(64): 'END' expected but end of file found
请问这是怎么回事,谢谢大家!
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, Grids, DBGrids, StdCtrls, Mask, DBCtrls, ExtCtrls;type
TForm5 = class(TForm)
Label1: TLabel;
RadioGroup1: TRadioGroup;
Button1: TButton;
DBGrid1: TDBGrid;
DataSource1: TDataSource;
ADOTable1: TADOTable;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form5: TForm5;implementation{$R *.dfm}procedure TForm5.Button1Click(Sender: TObject);
begin
if radiogroup1.ItemIndex<>-1 then
begin
case radiogroup1.ItemIndex of
0:begin
adotable1.Filtered :=false;
adotable1.Filter :='工号='+''''+edit1.Text+'''';
adotable1.Filtered :=true;
end;
1:begin
adotable1.Filtered :=false;
adotable1.Filter :='姓名='+''''+edit2.Text+'''';
adotable1.Filtered :=true;
end;
2:begin
adotable1.Filtered :=false;
adotable1.Filter :='部门编号='+''''+edit3.Text+'''';
adotable1.Filtered :=true;
end;
end;
end;end.编译时报错:[Error] user_inf_out.pas(56): Record, object or class type required
[Error] user_inf_out.pas(64): 'END' expected but end of file found
[Error] user_inf_out.pas(64): 'END' expected but end of file found
请问这是怎么回事,谢谢大家!
begin
if radiogroup1.ItemIndex <>-1 then
begin
case radiogroup1.ItemIndex of
0:begin
adotable1.Filtered :=false;
adotable1.Filter :='工号='+''''+edit1.Text+'''';
adotable1.Filtered :=true;
end;
1:begin
adotable1.Filtered :=false;
adotable1.Filter :='姓名='+''''+edit2.Text+'''';
adotable1.Filtered :=true;
end;
2:begin
adotable1.Filtered :=false;
adotable1.Filter :='部门编号='+''''+edit3.Text+'''';
adotable1.Filtered :=true;
end;
end;
end;
end;