Hi Yashkamal,
I have an example application using VFP7 as a front-end client to a postgres back-end server. It uses sql pass throughs to talk to the back-end database server. You could take a look at it and see if there is anything in it you might adopt in your app. If your interested, it can be downloaded at:
https://www.smvfp.comAfter entering the site, it will be option 18.