Transistor used as switch not working when connecting a water solenoid valve
How much current does the solenoid require to open, and what is the part number??

Your circuit will not work.  You are just shorted through the solenoid, as it's nothing more than a coil of wire.

In general, to drive a solenoid with a transistor, the solenoid needs to be in series with the collector (or emitter if the solenoid must be grounded, but it becomes a more complex issue).  You have it in parallel.  You should put in a resistor to limit current to no more than what the solenoid needs. Ballparking a 9V drop, if you need 100 mA, your resistor should be 90 ohms.  This needs to be in series with the solenoid, and then they go to the collector.  You will need a fast diode across the solenoid, reverse biased with respect to the supply,  to avoid killing the transistor.  Lastly, you should never let the transistor base "float" -- you should pull it to ground through a large resistor.

See http://www.edaboard.com/thread324980.html for a rough example


That example does not have the resistor -- you may or may not need it, depending on the nature of the solenoid and transistor.