Hi, Eliot is right about that. If you look up a word in a dictionary, you can gather which form to use::
to ask sn. -- jmdn. fragen -> dich fragen
to tell sn. -- jmdm. sagen -> dir sagen
jmdn = jemanden (accusative form of jemand)
jmdm = jemandem (dative form of jemand)