You say the "...Database doesnot contain any object named 'TempTable'". So why are you trying to select from a table that doesn't exist?
A stored procedure will parse and compile when something doesn't exist, because it expects that the missing object WILL exist when the sp is executed. This allows you to write sp's that will run against a temporary object or one that is only created prior to the execution of the sp.
-Bill