这是我button1的代码,可以帮我修改一下吗?
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, DBTables;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Query1: TQuery;
Query1BDEDesigner: TStringField;
Query1BDEDesigner2: TStringField;
Query1BDEDesigner3: TStringField;
Query1BDEDesigner4: TBooleanField;
Query1BDEDesigner5: TDateTimeField;
Query1BDEDesigner6: TSmallintField;
Query1BDEDesigner7: TMemoField;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
if edit1.text=''then
begin
showmessage('请输入书名!');
abort;
end;
try
query1.DisableControls;
query1.close;
query1.paramByName('学号').value:='%'+edit1.text+'%';
query1.open;
finally
query1.EnableControls;
if query1.fieldByname('学号').value='' then
begin
showmessage('无书名!');
edit1.Clear;
end;
end;
end.
错误提示:[Error] Unit1.pas(56): ';' expected but '.' found
[Error] Unit1.pas(58): Declaration expected but end of file found
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'