Using pyodbc if I try to execute this code in 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)') , and if I do this:
cursor.execute('insert into test VALUES (null)')
... it works. Is there any other way to accomplish this, which means that I don't need to check the arguments that I pass?
source share