String Error GO + SQL Server 2008

Hey there. I’m getting an error when trying to insert a string, I get the fallowing error, it’s in brazilian portuguese but Imma translate it below;

Servico: teste.exe
Log    : Registros Alertas,erro stmt.Exec(): SQLExecute: {42000} [Microsoft][ODBC SQL Server Driver][SQL Server]Aspas não fechadas depois da cadeia de caracteres 'AV. T-2, 3158 - ST. BUENO, GOIANIA - GO, 74215-010, BRASIL'.
{42000} [Microsoft][ODBC SQL Server Driver][SQL Server]Sintaxe incorreta próxima a 'AV. T-2, 3158 - ST. BUENO, GOIANIA - GO, 74215-010, BRASIL'.
{42000} [Microsoft][ODBC SQL Server Driver][SQL Server]Não foi possível preparar uma ou mais instruções.

It says smth like; Incorrect syntax near ‘AV. T-2, 3158 - ST. BUENO, GOIANIA - GO, 74215-010, BRASIL’. …

The striing I insert is usually like below;

MOTORISTA "FLAVIO GOMES DA SILVA" IDENTIFICADO NO ALVO "ODA9776 - M. BENZ / MARCOPOLO PARADISO LD - AZUL".<br><br>DATA/HORA DO EVENTO;<br>06/01/2017 07:09:45"<br><br>LOCALIZACAO APROXIMADA;<br>AV. T-2, 3158 - ST. BUENO, GOIANIA - GO, 74215-010, BRASIL.

Is there anything in this string that must be causing this error?

My guess is the string is not properly escaped as it is included in the SQL statement.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.