there are 2 codes, one for the key pattern and one to unlock the ecu.
a good locksmith can get your code off your old key for the pattern.
and you can just tape old key up near the barrel for testing.
dont spend loads, just a key to open door so you can test first, wouldnt want to spend loads just to find the barrels duff.