Well if the code is on the sim it will be the pin number and you only get 3 trys before you need a puk code so try a different sim in it. If it still askes for a code then its the security code and basically your screwed if you dont know it
Not to mention the fact that its obviously been lost so will more than likely have been reported as lost and barred anyway.