Thank you for your guidance and i would like to make this point clear that the intention is to get the problems solved and not to get the code, since from the previous replies we didn't actually get any solution for our problem, thats why finally I've asked for the sample code. Anyway we will do a research and find it out.
Thank you,
Saravanan.S