Swallowing cocaine isn't exactly ineffective, its just a lot less effective than other methods of administration.
The more acidic your stomach is, the less cocaine will be absorbed and the shorter it will last, if your stomach is less acidic (more basic) than the cocaine should last longer.
You're not going to get the same "rush" from swallowing cocaine that you're going to get from snorting or IVing cocaine, but it will still work.