Needlessly. Effort without success. Vainly failing. Unsuccessful result.
“We looked for your puppy but it was in vain we never found it.”