Made a connection to the database