I can sympathise with the OP… with so many thinking they know it best, he is justified in feeling unsure.
But I can assure him that the code given is the official AIS method for blocking ANY data usage. No chance of data leakage if data is turned off at the source.
If you turn it off on the phone, the SIM itself can still supply data and any accidental switch can eat up your credit in seconds. Applying the code stops this possibility altogether, until you apply the code to turn it back on.