working version: DBConnector

Add new exception and checking for port number.