Welcome to Dreamviews, ctn29.

To be honest, the fact that you realized you were dreaming meant that you didn't fail at all. Of course, you're disappointed that you woke up out of surprise, but that's a normal thing to experience if you're just starting. The dream stability link Shift posted will give you good information.

A tip from my behalf would be to stop focusing on the fact that you just became lucid when you are, and to focus on what you want to do. You can be happy in the morning when you wake up, after you've flown over the atmosphere or dived to the depths of the oceans. But when you're lucid it's best to keep your cool and do something, or else you might just wake up.

Congratulations on your lucid, and may you have many more in the future.