1conn = pyodbc.connect( connectionString )
2cursor = conn.cursor()
3cursorQuery = "SELECT * FROM .."
4cursor.execute( cursorQuery )
5records = cursor.fetchall()
6insertObject = []
7columnNames = [column[0] for column in cursor.description]
8
9for record in records:
10 insertObject.append( dict( zip( columnNames , record ) ) )