I need to migrate a system with SQLSERVER database to a PostGreSQL 9.3. I have never worked with PostGre before so I'm using Entity Framework 6 with model-first to make the process easier. The migration application is being developed in WPF. My first two tables imported quietly, but one of the records in the third table needs to be inserted " NOT ".
IMPORTANT: I do not have the option to insert without an accent because the system that uses the base of POSTGre is a legacy system that will only understand with an accent. On a production basis of this system is accented and with the same configuration in the image below.
// produtor rural
if (objPessoa.pes_cliProdutorRural == true)
objNovoCliente.produtorrural = "SIM";
else
objNovoCliente.produtorrural = "NÃO";
// adicionar no contexto
this.objCtxMSP2.tbcadclientes.Add(objNovoCliente);
this.objCtxMSP2.SaveChanges();
But it gives the following error in SaveChanges:
InnerException = {"ERROR: 22001: too long value for type character (3) "}
Searching the internet I saw that it could be something about "collation" and / or "encoding".
This is the current bank configuration:
WhentryingtocreatethebankwithencodingLATIN1asviinanotherforumgivesthefollowingerror
Any ideas how to solve this?