Using pyodbc, if I try and execute this code on a date field:
cursor.execute('insert into test VALUES (?)', None)
... I get pyodbc.Error: ('HY000', '[HY000] [SAS][SAS ODBC Driver][SAS Server]ERROR: Value 1 of VALUES clause 1 does not match the data type of the corresponding column in (-1) (SQLExecDirectW)')
, while if I execute this:
cursor.execute('insert into test VALUES (null)')
... it works. Is there another way to be executing this, that means I don't need to check the arguments I'm passing?