如果你用的95/98/nt 操作系统//必须安装ado的驱动/如果你是用的WIn2000就可以直接拷贝了,另一个原因你的连接字符是固定的 //找不到响应的目录!

解决方案 »

  1.   

    用Access还用什么odbc,直接连就可了,
    连接字符串中的DataSource= ExtractFilePath(Application.ExeName) + 'demo.mdb'
      

  2.   

    var
      str:string;
    begin
    str:='Provider=Microsoft.Jet.OLEDB.4.0;Data Source=';
      str:=str+ExtractFilePath(Application.ExeName) + 'WebSrever.mdb'+';Persist Security Info=False';
      ADODataSet1.ConnectionString:=str;
    end; 
      

  3.   

    先把AdoConnection的connected=false
    然后在程序启动的时候,动态联接数据库,比如在form的oncreate事件中写联接数据库的代码
    var
      str:string;
    begin
      AdoConnection1.connected:=false;
      str:='Provider=Microsoft.Jet.OLEDB.4.0;Data Source=';
      str:=str+ExtractFilePath(Application.ExeName) + 'WebSrever.mdb'+';Persist Security Info=False';
      AdoConnection1.ConnectionString:=str;
      AdoConnection1.Connectec:=true;
    end;