Only saying "not working" does not make any sense to us.
What is the error you are getting with these two.. Whether it is a compilation error or run time error?? What is the error returned? Please...