@staticmethod
def _conn_string(host, username, password, database):
    """Return a connection string to use with adodbapi.

        """
    conn_str = 'Provider=SQLOLEDB;Data Source=%s;Initial Catalog=%s;' % (host,
        database)
    if username:
        conn_str += 'User ID=%s;' % username
    if password:
        conn_str += 'Password=%s;' % password
    if not username and not password:
        conn_str += 'Integrated Security=SSPI;'
    return conn_str
