How to use the pyodbc.drivers function in pyodbc

To help you get started, we’ve selected a few pyodbc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mkleehammer / pyodbc / tests3 / sqlitetests.py View on Github external
def test_drivers(self):
        p = pyodbc.drivers()
        self.assertTrue(isinstance(p, list))
github mkleehammer / pyodbc / tests2 / sqlservertests.py View on Github external
def test_drivers(self):
        drivers = pyodbc.drivers()
        self.assertEqual(list, type(drivers))
        self.assertTrue(len(drivers) > 0)

        m = re.search('DRIVER={?([^}]+?)}?;', self.connection_string, re.IGNORECASE)
        current = m.group(1)
        self.assertTrue(current in drivers)
github mkleehammer / pyodbc / tests2 / pgtests.py View on Github external
def test_drivers(self):
        p = pyodbc.drivers()
        self.assertTrue(isinstance(p, list))
github mkleehammer / pyodbc / tests3 / mysqltests.py View on Github external
def test_drivers(self):
        p = pyodbc.drivers()
        self.assertTrue(isinstance(p, list))
github mkleehammer / pyodbc / tests3 / sqlservertests.py View on Github external
def test_drivers(self):
        p = pyodbc.drivers()
        self.assertTrue(isinstance(p, list))
github mkleehammer / pyodbc / tests2 / sqlitetests.py View on Github external
def test_drivers(self):
        p = pyodbc.drivers()
        self.assertTrue(isinstance(p, list))
github mkleehammer / pyodbc / tests3 / informixtests.py View on Github external
def test_drivers(self):
        drivers = pyodbc.drivers()
        self.assertEqual(list, type(drivers))
        self.assertTrue(len(drivers) > 1)

        m = re.search('DRIVER={?([^}]+?)}?;', self.connection_string, re.IGNORECASE)
        current = m.group(1)
        self.assertTrue(current in drivers)
github BritishGeologicalSurvey / etlhelper / etlhelper / setup_sql_server_driver.py View on Github external
def sql_server_odbc_driver_is_loaded(odbc_driver):
    """
    Check if pyodbc can see the specified ODBC driver.
    :return: boolean
    """
    return odbc_driver in pyodbc.drivers()
github morganjwilliams / pyrolite / pyrolite / util / database.py View on Github external
def check_access_driver():
    return [x for x in pyodbc.drivers() if x.startswith("Microsoft Access Driver")]
github totvs / tir / tir / technologies / core / base_database.py View on Github external
def check_pyodbc_drivers(self, driver_database):
        if not next(iter(list(filter(lambda x: x == driver_database, pyodbc.drivers()))), None):
            error_message = f"Driver: '{driver_database}' isn't a valid driver name!"
            self.webapp_internal.restart_counter = 3
            self.webapp_internal.log_error(error_message)