(self, db_key, conn_key=None, db_name=None)
return conn_str
Return a connection string to use with adodbapi
Return a connection string to use with adodbapi
Return a connection string to use with adodbapi
def _conn_string_adodbapi(self, db_key, conn_key=None, db_name=None):
        """Return a connection string to use with adodbapi"""
        if conn_key:
            _, host, username, password, database, _ = conn_key.split(":")
        else:
            _, host, username, password, database, _ = self._get_access_info(db_key, db_name)

        provider = self._get_adoprovider()
        conn_str = 'ConnectRetryCount=2;Provider={};Data Source={};Initial Catalog={};'.format(provider, host, database)

        if username:
            conn_str += 'User ID={};'.format(username)
        self.log.debug("Connection string (before password) %s", conn_str)
        if password:
            conn_str += 'Password={};'.format(password)
        if not username and not password:
            conn_str += 'Integrated Security=SSPI;'
        return conn_str
def _conn_string_adodbapi ( self , db_key , conn_key = None , db_name = None ) : if conn_key : _ , host , username , password , database , _ = conn_key . split ( ":" ) else : _ , host , username , password , database , _ = self . _get_access_info ( db_key , db_name ) provider = self . _get_adoprovider ( ) conn_str = 'ConnectRetryCount=2;Provider={};Data Source={};Initial Catalog={};' . format ( provider , host , database ) if username : conn_str += 'User ID={};' . format ( username ) self . log . debug ( "Connection string (before password) %s" , conn_str ) if password : conn_str += 'Password={};' . format ( password ) if not username and not password : conn_str += 'Integrated Security=SSPI;' return conn_str