""" DBへ接続する
"""
conn_str = """provider=SQLOLEDB;←SQL Serverです。
Data Source=***.***.***.***;
User ID=*****;
Password=*****;
Initial Catalog=*******"""
conn = adodbapi.connect(conn_str)
cur = conn.cursor()
STRSQL = "select users from user_tables where useddate between %s and %s" % (FIRST_DAY_OF_LAST_MONTH,END_OF_LAST_MONTH)
print STRSQL
←ココまでは上手く行っているみたいに見えます。