if (bMessage) then begin if (iReturn = 0) then Application.MessageBox('Connection OK!', 'Information', MB_OK) elseif (iReturn = -1) then Application.MessageBox('Connection Error!', 'Error', MB_ICONERROR + MB_OK); end;
if (iReturn = 0) then Result := ConnectionString elseif (iReturn = -1) then Result := ''; finally Screen.Cursor := OldCursor; end; end;
procedure TForm1.Button1Click(Sender: TObject); begin DataBaseConnection_Test(True); end