def METHOD_NAME(self) -> None:
    with self.printer.print_msg('Opening connection to MSSQL database'):
        driver = self.settings['driver']
        server = self.settings['server']
        database = self.settings['database']
        username = self.settings['user']
        password = self.settings['password']
        connection_string = (
            f'DRIVER={{{driver}}};'
            f'SERVER={server};'
            f'DATABASE={database};'
            f'UID={username};'
            f'PWD={password};'
            'ENCRYPT=yes;'
            'TrustServerCertificate=yes;'
        )
        self._ctx = pyodbc.connect(connection_string)