各位好,怎么样才能在窗体中显示button已经被点击了?
怎么样才能把excel表中的数据导入到access数据库呢?
谢谢各位帮忙!!

解决方案 »

  1.   

    1、implementation{$R *.dfm}var
      i:integer;procedure TForm1.btnClickClick(Sender: TObject);
    begin
      inc(i);
      showmessage(Pchar('第  '+inttostr(i)+'  次点击Button!'));
    end;
    2、
    procedure TForm1.btn_excel2accessClick(Sender: TObject);
    begin
        ADOConnection2.ConnectionString:=
    'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\mysmallexe\excel2sql\Server.MDB;'
    +'Persist Security Info=False;Jet OLEDB:Database Password=happynewyear';
    ADOConnection2.Execute('SELECT * into [abc] FROM [excel 8.0;database=G:\mysmallexe\excel2sql\yp.xls].[abc$]');
    end;
      

  2.   

    1、用SpeedButton ,然后设置它们的GroupIndex点击时,按钮会凹陷下去...