So initialise the Connection property. You can't access a database using a Command if you don't have a Connection to connect to the database over. You can't talk to someone over the telephone if you don't have a telephone line.