I am trying to do an update on a table in SQL Server 2008 R2, but the column writes only 8000 characters.
The column's datatype is set to text
, but I have already tried to change to varchar(max)
with no success.
I also used the cast('variable' as text)
and cast('variable' as varchar(max))
, also unsuccessfully.
When doing the same update by the SQL console (I made a response.write on the screen, copied and pasted it) or inserted more than 8000 characters manually, it works (through Microsoft Visual Studio).
sql_Up = "UPDATE ABVC_Eventos SET titulo_eve = '" & Strip(Evento) & "', cod_sup_eve = '" & Strip(cod_sup_eve) & "', cod_sup2_eve = '" & Strip(cod_sup2_eve) & "', texto_eve = CAST('" & Strip(texto_eve) & "' AS TEXT), WHERE id_eve = '" & Strip(Cod_Evento) & "'"
set Rs_sqlUp = bco.Execute(sql_Up)
The 'Strip' function is for sanitization.