On the P910, and most other SonyEricsson phones, there are no settings for flatly blocking or unblocking caller ID. It's always implemented on a per-call basis. In fact, on the P Series (P800, 802, P900, P910), you are able to only block calls on numbers you manually enter. If you dial via your Contacts, you cannot block/unblock the calls. You'll have to copy the number, get out of Contacts, paste the number, then block/unblock the caller ID for that particular call.
It's always better to provide pertinent information when asking questions - like what service provider (carrier) you are using. I will answer your question based on T-Mobile USA:
T-Mo implements both CLIR and CLID by default. Therefore, if you want to block your caller ID from being transmitted and displayed on outgoing calls, you will have to do it on a per-call basis. And, yes, the codes do work, but must be entered correctly:
#31#+12125551212 SEND (as an example, to block), or
*31#+12125551212 SEND (as an example, to unblock).
If you truly want to BLOCK ALL CALLS, you can call Technical Service, and request this feature. However, you must realize that when you do this, you can no longer have access to SOME OF THE VOICEMAIL FEATURES that are dependant on caller ID like being able to use 8 (old 88) to return calls within VoiceMail; in addition, you cannot reach people who have activated, on their landline, the rejection of any calls that have blocked their caller ID. You'll be surprised how pervasive this is in the US.
I have enclosed some useful URLs to help you out if you want to know more about these codes and what they do:
http://www.mobileshop.org/usertech/gsmcodes.htm
http://www.geckobeach.com/cellular/secrets/gsmcodes.asp
http://www.gsm-security.net/faq/gsm-caller-id-clip-clir.shtml