Issue Details (XML | Word | Printable)

Key: DNET-786
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Jiri Cincura
Reporter: Workdev Tecnologia da Informação LTDA
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
.NET Data provider

Accentuation in Scrip (WIN1252)

Created: 20/Sep/17 01:16 PM   Updated: 20/Sep/17 05:23 PM
Component/s: None
Affects Version/s: 5.10.0.0
Fix Version/s: None

File Attachments: 1. File 5100_000000.sql (0.8 kB)



 Description  « Hide
Script.
CREATE EXCEPTION EXC_SM_CD_ES_PRODUTO 'Produto Não Cadastrado.';
CREATE EXCEPTION EXC_SM_CD_PARAMETROS 'Falha no Parâmetro.';
CREATE EXCEPTION EXC_SM_MV_CT_CB_CONTA_MO 'Movimentador Inválido para Esse tipo de Conta.';

Execute Script (.NET Data provider)

EXC_SM_CD_ES_PRODUTO 'Produto N?o Cadastrado.';
EXC_SM_CD_PARAMETROS 'Falha no Par?metro.';
EXC_SM_MV_CT_CB_CONTA_MO 'Movimentador Inv?lido para Esse tipo de Conta.';

Result.


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jiri Cincura added a comment - 20/Sep/17 01:39 PM
Show the code you're using.

Workdev Tecnologia da Informação LTDA added a comment - 20/Sep/17 01:55 PM
Connection:

data source=localhost;initial catalog=C:\SAD_GESTOR\METHASM.FDB;user id=sysdba;password=masterkey;character set=WIN1252;dialect=3;port number=3050;role name=;connection lifetime=0;connection timeout=15;pooling=True;packet size=4096;server type=Default

Code:

   FirebirdSql.Data.Isql.FbScript fbs = FirebirdSql.Data.Isql.FbScript.LoadFromFile(Path.GetTempPath() + "\\" + Program.ClsAmbiente.Sigla + "\\" + Program.ClsAmbiente.Sigla + "_000000.sql");
                        fbs.Parse();

                        FirebirdSql.Data.Isql.FbBatchExecution fbe = new FirebirdSql.Data.Isql.FbBatchExecution(Conexao);

                        new FirebirdSql.Data.Isql.FbBatchExecution(Conexao);

                        fbe.AppendSqlStatements(fbs);
                        fbe.Execute(true);

Jiri Cincura added a comment - 20/Sep/17 02:01 PM
What's the encoding of the file? Or better, share it here.

Workdev Tecnologia da Informação LTDA added a comment - 20/Sep/17 02:18 PM
Database:

SET SQL DIALECT 3;

SET NAMES WIN1252;

PAGE_SIZE 8192
DEFAULT CHARACTER SET WIN1252 COLLATION WIN1252;

Jiri Cincura added a comment - 20/Sep/17 05:22 PM
Your script is WIN1252. You need to load it manually with encoding or change it to UTF8, as that's the default encoding for LoadFromFile/ReadAllText.