Arduino + Solenoid Lock
It sounds like your 12 volt adaptor is not powerful enough to operate the lock solenoid. If you power up the solenoid only and directly using the adaptor it should work. If it doesn't, you'll need a more powerful adaptor. If it does work, then the problem is somewhere in your driver circuit or Arduino sketch.