V
V
voronin_denis2018-02-20 11:07:04
Python
voronin_denis, 2018-02-20 11:07:04

Operand type conflict: date incompatible with smallint?

Using pypodbc trying to update a table:
task_id = {unicode} u'{80A027C9-4A52-4E13-9E98-A1EFFFE8091E}'
task_type = {int} 30
value = {int} 1
query_s = "UPDATE TASK_STATUS_NEW SET STATUS = ? WHERE TASK_TYPE = ? and TASK_ID = '?'"
cursor.execute(query_s, [value, task_type, task_id])
cursor.commit()
DDL Tables
CREATE TABLE [dbo].[TASK_STATUS_NEW] (
[TASK_TYPE] smallint NOT NULL ,
[RESULT] nvarchar(255) COLLATE Cyrillic_General_CI_AS NOT NULL ,
[STATUS] smallint NOT NULL ,
[DATE] datetime NOT NULL ,
[TASK_ID] uniqueidentifier NOT NULL ,
[STEP] smallint NOT NULL ,
[ID] int NOT NULL
)
However, the error "Operand type conflict: date is incompatible with smallint" What does date mean if I don't access it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
voronin_denis, 2018-06-29
@voronin_denis

The point was that the cursor was not cleared after the previous request.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question