Q:

Python Inserting data into Sql Server

Struggling to figure out why this isnt working. I don't get any errors but it will not write to the table. 
import pyodbc
connprod = pyodbc.connect('DRIVER={SQL Server};SERVER=server;DATABASE=master;Trusted_Connection=yes')
cursorprod = connprod.cursor()

conndev = pyodbc.connect('DRIVER={SQL Server};SERVER=server;DATABASE=master;Trusted_Connection=yes')
cursordev = conndev.cursor()

connlocal=pyodbc.connect('DRIVER={SQL Server};SERVER=server;DATABASE=DBA;Trusted_Connection=yes')
cursorlocal = connlocal.cursor()

cursorprod.execute("SELECT Servername = @@servername    ,Date = getdate()   ,wait_type  ,waiting_tasks_count    ,wait_time_ms   ,max_wait_time_ms   ,signal_wait_time_ms FROM sys.dm_os_wait_stats GO")
rows = cursorprod.fetchall()

for row in rows:
    cursorlocal.execute('insert into dba.dbo.dm_os_wait_stats values (?,?,?,?,?,?,?)', row)
    cursorlocal.commit

A:

If your example is accurate, you're not calling the commit method:
cursorlocal.commit()

