I've suffered from this in the past from a combination of long hours of keyboard work & lifting weights.
As mentioned by another poster you need to look at your posture while at your desk, you'll be amazed at how much it can affect it.
I've also used this cream with great results, although you will need to place less stress on the area until you recover.
Carpal Tunnel Cream - Relief from Carpal Tunnel Syndrome, CTCream
Hope you can avoid the surgery!