可以,在程序中写入
PATH=D:\xunjian\database
ENABLE BCD=FALSE
DEFAULT DRIVER=PARADOX

解决方案 »

  1.   

    在TDATABASE控件的ALIASNAME属性中用到别名可以在程序在动态设置,或者是用sql explorer建好了再用。procedure TDm1.InitDataBase(aliasnames :string;localpath:string);
    var
      AliasParams:TStringList;
      FilePath : string;
    begin
      FilePath := 'path=' +  DefaultDir + localpath +'\';
      Aliasparams:=TStringList.Create;
      AliasParams.Add(Filepath);  if not Session.IsAlias(aliasnames) then
      begin
        try
          Session.AddAlias(aliasnames,'STANDARD',ALiasParams);
          Session.SaveConfigFile;
        finally
          AliasParams.Free;
        end;
      end else
      begin
        try
          Session.ModifyAlias(aliasnames,AliasParams);
          Session.SaveConfigFile;
        finally
          AliasParams.Free;
        end;
      end;
    end;