I would like to save html in SQL Server.
From the discussions I have seen in stackoverflow (Storing HTML in SQL Server), the recommendation is to use NVARCHAR(MAX)
or VARCHAR(MAX)
However, when I try to save html in the VARCHAR(MAX)
Or NVARCHAR(MAX)
column, it is giving me the following error:
pyodbc.DataError: ('22018', '[22018] [Microsoft][ODBC SQL Server Driver][SQL Server]Operand type clash: image is incompatible with varchar(max) (206) (SQLExecDirectW); [22018] [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. (8180)')
How can the issue be resolved?