请问怎样才能把Acceess的数据库连接到DatabaseName里啊,也就是要把Access连接起来啊。有谁能告诉我吗?谢谢。

解决方案 »

  1.   

    参考一下,用到ADOConnection、ADOTable、DataSource、DBGrid、Button控件:procedure TForm1.Button1Click(Sender: TObject);
    begin
      with ADOConnection1 do
      begin
        Connected := False;
        LoginPrompt:=False;
        ConnectionString := 'Provider=MicroSoft.Jet.OLEDB.4.0;'+
                            'Data Source=C:\db1.mdb;'+
                            'Persist Security Info=False';
        Connected := True;
      end;
      DataSource1.DataSet:=ADOTable1;
      DBGrid1.DataSource:=DataSource1;
      with ADOTable1 do
        begin
          Close;
          Connection:=ADOConnection1;
          TableName:='test';
          Open;
        end;
    end;http://community.csdn.net/Expert/topic/4733/4733871.xml?temp=.6343805
      

  2.   

    如楼上所言CSDN论坛浏览器:http://CoolSlob.ys168.com/