def createConn(MDB, PWD=''):
    """creates connection to database
    returns con(connection) and cur(cursor)
    example:
    con,cur=createConn("my.mdb")
    #now i'm connected
    cur.close()
    con.commit()#save
    con.close()
    """
    import pyodbc
    DRV = ['{Microsoft Access Driver (*.mdb)}',
        '{Microsoft Access Driver (*.mdb, *.accdb)}']
    try:
        con = pyodbc.connect('DRIVER={};DBQ={};PWD={}'.format(DRV[1], MDB, PWD)
            )
    except:
        con = pyodbc.connect('DRIVER={};DBQ={};PWD={}'.format(DRV[0], MDB, PWD)
            )
    cur = con.cursor()
    return con, cur
