看程序
----------
begin  f_data.mast.connected:=false;
  f_data.mast.Params.clear;
  f_data.mast.Params.add('user name=shbx2');
  f_data.mast.Params.add('password=shbx');
  f_data.mast.loginprompt:=false;
  f_data.mast.keepconnection:=true;  try
    f_data.mast.connected:=true;  except
    showmessage('数据库没有没有正确连接!');   
    application.terminate;
  end;
  if not f_data.yhglb.active then f_data.yhglb.open;end;
-----------
点击应用程序时 程序老是执行到  showmessage('数据库没有没有正确连接!'); 
不知道时哪里的原因  !请大家帮忙!!  mast是database类型

解决方案 »

  1.   

    AliasName DatabaseName没有指定。
      

  2.   

    try
        f_data.mast.connected:=true;  except
        on e: Exception do Showmessage(e.Message);
        on e: Exception do Showmessage(inttostr(E.HelpContext));
        //showmessage('数据库没有没有正确连接!');   
        application.terminate;
      end;
    //看看为什么没有连接上
      

  3.   

    try
        f_data.mast.connected:=true;  except
        on e: Exception do Showmessage(e.Message);
        on e: Exception do Showmessage(inttostr(E.HelpContext));
        //showmessage('数据库没有没有正确连接!');   
        application.terminate;
      end;
    //看看为什么没有连接上
      

  4.   

    你的 f_data.mast.AliasName为空,它跟什么连呀?