how to change type 'pyodbc.row' to dict in python code example
Example: pyodbc cursor create list of dictionaries
conn = pyodbc.connect( connectionString )
cursor = conn.cursor()
cursorQuery = "SELECT * FROM .."
cursor.execute( cursorQuery )
records = cursor.fetchall()
insertObject = []
columnNames = [column[0] for column in cursor.description]
for record in records:
insertObject.append( dict( zip( columnNames , record ) ) )