Thanks for helping me out guys. You are both right which difference piece of code provided. It wasn't this piece of code that was not letting me accomplish the job. I finally figured out where was I making a mistake :-) I am marking this thread as solved.
Vicky