unit uTiendaWebUtils; interface function HayConexionConTienda(const AServer : String; const ABDName : String; const ABDUser : String; const ABDPass : String; var ErrorMessage : String): Boolean; implementation uses SysUtils, SqlExpr, Dialogs; function HayConexionConTienda(const AServer : String; const ABDName : String; const ABDUser : String; const ABDPass : String; var ErrorMessage : String): Boolean; var SQLConnection1: TSQLConnection; begin SQLConnection1 := TSQLConnection.Create(nil); try with SQLConnection1 do begin Name := 'SQLConnection1'; ConnectionName := 'MySQLConnection'; DriverName := 'MySQL'; GetDriverFunc := 'getSQLDriverMYSQL'; LibraryName := 'dbxmys30.dll'; LoginPrompt := False; with Params do begin Clear; Add('BlobSize=-1'); Add('DriverName=MySQL'); Add('ErrorResourceFile='); Add('LocaleCode=0000'); Add('Compressed=True'); Add('Encrypted=True'); Add('Database=' + ABDName); Add('HostName=' + AServer); Add('User_Name=' + ABDUser); Add('Password=' + ABDPass); end; VendorLib := 'LIBMYSQL.dll'; try Connected := True; Result := True; Connected := False; except on E : Exception do ShowMessage(e.Message); end; end; finally FreeAndNIL(SQLConnection1); end; end; end.