I agree that a code of nonviolence, or refusal to take life, is problematic when applied in the context of a party where no one else shares that code. I emphatically disagree that vows of nonviolence or abstinence from taking life are somehow inappropriate to a D&D-style fantasy game. My own take on Good has always been that good-aligned (or heroic) creatures view violence as evil... a necessary evil, sometimes, but still evil. As such, in the hierarchy of options, an approach to a problem that does not involve taking life is likely more "good" than one that does involve taking life. Consequently, there are a number of pacifist characters and characters that use nonlethal approaches to confrontation in my game worlds. It's not like the options aren't there. What with creative skill uses, mind-affecting spells, and nonlethal damage options, PCs have a number of ways to resolve confrontations that don't involve slaughtering foes.
Now, I do think that a nonlethal damage code requires a particular kind of DM to pull off. For instance, my general rule on "alignment" is that few beings are truly irredeemable or incorruptible; the only beings with a defined alignment are those with an alignment subtype (fiends, celestials, modrons, slaadi, etc.). Thus, orcs, goblins, etc. may be savage, corrupt, or murderous, but there's no reason why one couldn't as easily negotiate with them as with human adversaries. As such, the skills of a silver-tongued diplomat, a peace-bringing cleric, or a skilful enchanter can come into play as easily as the greataxe of a mighty dwarven warrior.
Which isn't to say, of course, that certain adventures aren't simply inappropriate for a nonviolent character. Stopping a rampaging horde of orcs, dealing with an incursion of demons from the Abyss, or surviving a night hunt by werewolves through the forests might require a bit of serious death-dealing. But there are certainly other adventures that work in this millieu.