There is cookbook article: http://symfony.com/doc/current/cookbook/doctrine/dbal.html which shows how to get and use the dbal connection without going through the entity manager.
But like @Rpg600 I am a bit puzzled at why you are doing such a thing.
You should probably make this a service and inject the connection.
Maybe:
class UserCustomQuery($conn)
{
public function __construct($conn) { $this->conn = $conn; }
public function setName($userId,$name)
{
....
Controller:
$userCustomQuery = $this->get('user.custom.query');
$userCustomQuery->setName(1,'Tom');