There is a limit to the power of prayer. We are not to expect that God will give us everything we choose to ask for. We know that we sometimes ask, and do not receive, because what we ask for isn’t of God’s desire for us. If we pray counter to the love God would have us demonstrate, if we ask contrary to His will, if we ask merely for the gratification of our own desires, without a thought or care for His glory, we must not expect that we will receive, and indeed we will not receive.
But, when we ask in faith, with love and concern for God’s glory, if we don’t receive the precise thing we asked for, we will receive an equivalent or something better, and we will rejoice to receive it instead.
Pray, but take care in what you ask. Pray not with expectation, with demands, or to test Him, but pray on bended knee, asking first that His will shall prevail. After that, all else will be delivered and given just as we have asked.