我采用的办法如下,其中str_connect是从文本中读入的链接字符串。如果连接不上的话程序中执行adoconnection1.ConnectionString := str_connect;这一句比较耗费时间,有没更快一点的解决办法啊?
      
       adoconnection1.ConnectionString := str_connect;
       try
         adoconnection1.Connected  := true;
       except
       if MessageDlg('数据库连接出错',mtError,[mbYes],22) = mrYes then;
          ExitProcess(0);
       end;