在Delphi中出现的couldnt compile used unit unit2.pas,大家看看哪错了,谢谢

Delphi 禁用TEdit右键菜单及复制粘贴简的单方法如下:
1)  设置TEdit的ReadOnly 属性为True 
     Edit1.ReadOnly := True;
2)  在TEdit的OnContextPopup中使Handled := True

unit Unit2;

procedure TFrmReport.Edit1ContextPopup(Sender: TObject; MousePos: TPoint;
  var Handled: Boolean);
begin
  Handled := True;
end;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms,
  Dialogs, ExtCtrls, StdCtrls, ComCtrls, XPStyleActnCtrls, ActnList,
  ActnMan, DB, ADODB, Buttons;

type
  TForm2 = class(TForm)
    PageControl1: TPageControl;
    TabSheet1: TTabSheet;
    TabSheet2: TTabSheet;
    TabSheet3: TTabSheet;
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    Edit4: TEdit;
    Edit5: TEdit;
    Edit6: TEdit;
    Button2: TButton;
    Button3: TButton;
    Image1: TImage;
    TabSheet4: TTabSheet;
    GroupBox3: TGroupBox;
    Label17: TLabel;
    Label18: TLabel;
    Label19: TLabel;
    Label20: TLabel;
    Label21: TLabel;
    Label22: TLabel;
    Label23: TLabel;
    Label24: TLabel;
    Label25: TLabel;
    Label26: TLabel;
    Edit17: TEdit;
    Edit18: TEdit;
    Edit19: TEdit;
    Edit20: TEdit;
    Edit21: TEdit;
    Edit22: TEdit;
    Edit23: TEdit;
    Edit24: TEdit;
    Edit25: TEdit;
澳门新葡亰3522平台游戏,    Edit26: TEdit;
    ADOConnection1: TADOConnection;
    ADOQuery1: TADOQuery;
    Button1: TButton;
    BitBtn1: TBitBtn;
    procedure Button1Click(Sender: TObject);

    private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

uses Unit1;

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);
begin
  if  edit17.Text=”then
    
messagebox(form2.Handle,’请输入姓名’,’警告’,mb_ok+mb_iconwarning)
  else
    if  edit18.Text=”then
      
messagebox(form2.Handle,’请输入性别’,’警告’,mb_ok+mb_iconwarning)
  else
    if  edit19.Text=”then
      
messagebox(form2.Handle,’请输入职位’,’警告’,mb_ok+mb_iconwarning)
  else
    if  edit20.Text=”then
      
messagebox(form2.Handle,’请输入生日’,’警告’,mb_ok+mb_iconwarning)
  else
    if  edit21.Text=”then
       
messagebox(form2.Handle,’请输入办公电话’,’警告’,mb_ok+mb_iconwarning)
  else
    if  edit26.Text=”then
       
messagebox(form2.Handle,’请输入移动电话’,’警告’,mb_ok+mb_iconwarning)
  else
     if  edit22.Text=”then
     
messagebox(form2.Handle,’请输入QQ’,’警告’,mb_ok+mb_iconwarning)
   else
     if  edit23.Text=”then
     
messagebox(form2.Handle,’请输入住址’,’警告’,mb_ok+mb_iconwarning)
   else
     if  edit24.Text=”then
      
messagebox(form2.Handle,’请输入兴趣爱好’,’警告’,mb_ok+mb_iconwarning)
     else
    begin
     with form1.ADOQuery1 do
      begin
        close;
      sql.Clear;
      sql.Add(‘insert into
Link(姓名,性别,职位,生日,办公电话,移动电话,QQ,住址,兴趣爱好,备注)values(‘);
     
sql.Add(””+edit17.Text+””+’,’+””+edit18.Text+””+’,’+””+edit19.Text+””);
      
sql.Add(‘,’+””+edit20.Text+””+’,’+””+edit21.Text+””+’,’+””+edit26.Text+””+’,’+””+edit22.Text+””+’,’+””+edit23.Text+””+’,’+””+edit24.Text+””+’,’+””+edit26.Text+””+’)’);
      execsql;
     end;
      messagebox(form2.Handle,’联系人信息添加成功’,’恭喜’,mb_ok);
     end;
end;