63 Draw near unto me and I will draw near unto you; seek me diligently and ye shall find me; ask, and ye shall receive; knock, and it shall be opened unto you.
64 Whatsoever ye ask the Father in my name it shall be given unto you, that is expedient for you;
A first reading of this scripture might bring to your mind images of the Savior knocking on the door that has no doorknob. However, a more careful reading would remind us that we are the ones who have to knock. I don’t think it is trivial that this scripture describes the steps to follow before we knock. We must draw near unto him. We must seek him. Then the door is opened when we knock. Then, when we ask, we will receive.
Part of the challenge we experience when we don’t feel like our prayers are being answered is that we may have failed to do the first two steps. Part of the process of studying an problem out in your mind (reference D&C 9:7-9) is for us to draw need to the Lord and seek to understand His will. As you read the definition of prayer in the Bible dictionary, you learn a critically important principle. Prayer is not about getting the Lord to give you what you want, it is about aligning yourself with Him so he can give you what you need. Or, in other words, what is expedient for you. Faith in Jesus Christ requires that we put our trust in Him. We must come to realize that He loves us more than anyone has ever loved us. With this faith we can then allow our will to bend to match his will and then He can give us all that we need.
Bible Dictionary - Prayer
"As soon as we learn the true relationship in which we stand toward God (namely, God is our Father, and we are His children), then at once prayer becomes natural and instinctive on our part (Matt. 7:7–11). Many of the so-called difficulties about prayer arise from forgetting this relationship. Prayer is the act by which the will of the Father and the will of the child are brought into correspondence with each other. The object of prayer is not to change the will of God but to secure for ourselves and for others blessings that God is already willing to grant but that are made conditional on our asking for them. Blessings require some work or effort on our part before we can obtain them. Prayer is a form of work and is an appointed means for obtaining the highest of all blessings.” (LDS Scriptures Bible Dictionary “Prayer”)
It is so hard when sincere prayer about something you desire very much is not answered the way you want. It is difficult to understand why your exercise of deep and sincere faith from an obedient life does not grant the desired result. The Savior taught, “Whatsoever ye ask the Father in my name it shall be given unto you, that is expedient for you.” (D&C 88:64) At times it is difficult to recognize what is best or expedient for you over time. Your life will be easier when you accept that what God does in your life is for your eternal good. (Richard G. Scott, "Using the Supernal Gift of Prayer”, April 2007 LDS General Conference).