请采取动态配置BDE别名的办法来解决。

解决方案 »

  1.   

    DBF的文件,根本不需要BDE,直接用Table连接就可以了!!!!!
      

  2.   

    你拷贝了文件还不行,需要在注册表中注册一下才可以
    以下是cobi的一段注册Bde的过程,把它放在FormCteate中,或者在工程文件的初始化之前运行它
    配置BDE注册的代码:
    procedure InitBde;
    var
       DataDirectory : string;
       ARegistry     : TRegistry;
    begin
      DataDirectory := ExtractFilePath( Application.ExeName );
      DataDirectory := DataDirectory+'bde\';  //Bde路径根据你的实际情况修改
      ARegistry     := TRegistry.Create;
      with ARegistry do    {创建一个TRegistry对象实例  }
      begin
        RootKey := HKEY_LOCAL_MACHINE;{指定根键为HKEY_LOCAL_MACHINE}
        if not OpenKey( 'Software\Borland\BLW32', False ) then
        begin
    //      showmessage('key 1'); {写入BDE语言驱动程序所在的目录,即当前程序目录   }
          OpenKey( 'Software\Borland\BLW32', True );
          WriteString( 'BLAPIPATH', DataDirectory );
        end;
        CloseKey;    {关闭主键,同时将信息写入注册表}
        RootKey := HKEY_LOCAL_MACHINE;
        if not OpenKey('Software\Borland\Database Engine',False) then
        begin
    //      showmessage('key 2');
          OpenKey('Software\Borland\Database Engine',True);
          WriteString( 'DLLPATH', DataDirectory );
        end;
        CloseKey;    {关闭主键,同时将信息写入注册表}
        Destroy;     {释放内存  }
      end;
    end;
      

  3.   

    zzllabc(龙)吧我想做的事情都做了,看看代码再说吧
      

  4.   

    尽多事,用ClientDataset就足够了
      

  5.   

    to: zzllabc(龙)
    我把你以上程序加到TDataM.DataModuleCreate中了,
    但每次運行會有以下錯誤提示:
      an error ccurred while attempting to initialize the Borland database engine(error $3eo6)
    請問怎麼改???
      

  6.   

    to: machin(刷新一下)
    老兄,能否就我上面的問題講詳細一點,謝謝。
      

  7.   

    to: zzllabc(龙)
    我把你以上程序加到TDataM.DataModuleCreate中了,
    但每次運行會有以下錯誤提示:
      an error ccurred while attempting to initialize the Borland database engine(error $3eo6)
    請問怎麼改???
      

  8.   

    to: zzllabc(龙)
    我把你以上程序加到TDataM.DataModuleCreate中了,
    但每次運行會有以下錯誤提示:
      an error ccurred while attempting to initialize the Borland database engine(error $3eo6)
    請問怎麼改???
      

  9.   

    改成TADOTable就可以不用BDE了,楼上的说的也对动态建别名也行啊
      

  10.   

    to: qhuojun(加非猫)
    我用的數据庫是vf不是sql啊!
    怎么用ado呢,如果用ODBC速度又太慢?
    怎么辦