2
When I’m gonna make a INSERT
:
INSERT INTO categoria (cat_descricao,cat_status) VALUES ('não' ,'1' )
passing some element with accentuation parameter the following error occurs
ERROR: 22021: invalid byte Sequence for encoding "UTF8": 0xe3 0x6f 0x27>
But if I do the instruction SQL
on its own SGBD
it goes normal without any problem, but when I return this information through a DataTable
tbm appears with exchanged values. I am using the PostGres
and C#
public int ExecutarSQL(string sSQL)
{
int iLinhas = 0;
if (ConectaBanco())
{
_comando.CommandText = sSQL;
iLinhas = _comando.ExecuteNonQuery();
DesconectaBanco();
}
return iLinhas;
}
When performing this function the error occurs in the ExecuteNonQuery
, apparently appears to be a UTF error, but the bank accepts then the problem is in the language? what action can be taken to solve this problem?
See: http://stackoverflow.com/questions/4867272/invalid-byte-sequence-encoding-utf8
– Marconi