Subject RES: [IBO] TIB_Script fails on XE7, but not Delphi7.
Author Luiz

Hi,

 

What is the charset  of your DB?

 

Try remove the non-ascii characters test like as  ”Ç” en test again.

 

Luiz

 

 

De: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Enviada em: quinta-feira, 24 de setembro de 2015 10:35
Para: Lista IBObjects
Assunto: [IBO] TIB_Script fails on XE7, but not Delphi7.

 

 

HI All,

I am porting Delphi7->Delphi XE application, app that transfer MSSQL Data to Firebird 2.5.4,

This app generate scripts that will be execute in Firebird after, but We have a problem.

 

I Have a simple sql file script with a lot SQL commands like:

 

INSERT INTO IBPT (CODIGO, EX, TABELA, DESCRICAO, ALIQNAC, ALIQIMP, "0_0_2")

          VALUES ('1012100', NULL, '0', '--Reprodutores de raça pura', '26.75', '27.35', NULL);

 

 

If I execute in XE7, appear a error:

ISC ERROR CODE:335544569

 

ISC ERROR MESSAGE:

Dynamic SQL Error

SQL error code = -104

Token unknown - line 2, column 65

a

 

Always the same line and column, the letter 'a' is not the same.

The script file it´s Dos\Windows (Ansi codification) not a UTF. No secret chars, My execute is:

var  MyScript : TIB_Script;

(...)

MyScript.SQL.LoadFromFile(sFile);

MyScript.Execute;

 

Not only this file, but others scripts fails too.

 

When I test in Delphi7, all scripts runs fine with the same code and version of IBO.

 

Sample:

CREATE TABLE IBPT (

    CODIGO VARCHAR(15),

    EX VARCHAR(5),

    TABELA VARCHAR(5),

    DESCRICAO VARCHAR(487),

    ALIQNAC VARCHAR(5),

    ALIQIMP VARCHAR(5),

    "0_0_2" VARCHAR(1));

 

DELETE FROM IBPT;

 

INSERT INTO IBPT (CODIGO, EX, TABELA, DESCRICAO, ALIQNAC, ALIQIMP, "0_0_2")

          VALUES ('1012100', NULL, '0', '--Reprodutores de raça pura', '26.75', '27.35', NULL);

INSERT INTO IBPT (CODIGO, EX, TABELA, DESCRICAO, ALIQNAC, ALIQIMP, "0_0_2")

          VALUES ('1012900', NULL, '0', '--Outros', '26.75', '28.45', NULL);

INSERT INTO IBPT (CODIGO, EX, TABELA, DESCRICAO, ALIQNAC, ALIQIMP, "0_0_2")

          VALUES ('1013000', NULL, '0', '-Asininos', '26.75', '29.50', NULL);

INSERT INTO IBPT (CODIGO, EX, TABELA, DESCRICAO, ALIQNAC, ALIQIMP, "0_0_2")

          VALUES ('1019000', NULL, '0', '-Outros', '26.75', '29.50', NULL);

INSERT INTO IBPT (CODIGO, EX, TABELA, DESCRICAO, ALIQNAC, ALIQIMP, "0_0_2")

          VALUES ('1022110', NULL, '0', 'Prenhes ou com cria ao pé', '14.80', '15.40', NULL);

INSERT INTO IBPT (CODIGO, EX, TABELA, DESCRICAO, ALIQNAC, ALIQIMP, "0_0_2")

          VALUES ('1022190', NULL, '0', 'Outros', '14.80', '15.40', NULL);

INSERT INTO IBPT (CODIGO, EX, TABELA, DESCRICAO, ALIQNAC, ALIQIMP, "0_0_2")

          VALUES ('1022911', NULL, '0', 'Prenhes ou com cria ao pé', '14.80', '16.50', NULL);

(...)

 

Whats wrong?

Why delphi 7 runs fine and XE7 not using the same IBO version ibo5.7.7_2340?

 

Any ideas?