Methods and small molecule compounds for inhibition of sodium channels are provided. One example of a class of compounds that may be used is represented by the compound of Formula (I) or a pharmaceutically acceptable salt, N-oxide or solvate thereof, wherein A, B, D, R, R1, R′;1, R2, R3, R4, R5, R6, R7, R8 are as described herein.