Subject | RES: [IBO] TIB_Script fails on XE7, but not Delphi7. |
---|---|
Author | Luiz |
Post date | 2015-09-24T15:01:40Z |
Hi,
I just created the table posted in your script in my database.
I opened your script with word and did a copy/paste into ib_sql script.
I didn´t changed in your script.
I ran and all works well with “script completed with success”.
My db charset is win1252.
Luiz
De: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Enviada em: quinta-feira, 24 de setembro de 2015 11:45
Para: Lista IBObjects
Assunto: Re: [IBO] TIB_Script fails on XE7, but not Delphi7.
Yes.
When the sentence have acute (´) (not apostrofe), TIB_Script fails, sample:
INSERT INTO IBPT (CODIGO, EX, TABELA, DESCRICAO, ALIQNAC, ALIQIMP, "0_0_2")
VALUES ('12129910', NULL, '0', 'Stevia rebaudiana (Ka’a He’?)', '31.45', '36.20', NULL);
INSERT INTO IBPT (CODIGO, EX, TABELA, DESCRICAO, ALIQNAC, ALIQIMP, "0_0_2")
VALUES ('32041912', NULL, '0', 'Preparações contendo beta-caroteno, ésteres metílico ou etílico do ácido 8’-apo-beta-carotenóico ou cantaxantina, com óleos ou gorduras vegetais, amido, gelatina, sacarose ou dextrina, próprias para colorir alimentos', '31.45', '33.15', NULL)
How can I workaround this?
There is a page to report this bug?
2015-09-24 11:35 GMT-03:00 hamacker <sirhamacker@...>:
This script when I put only first 10 inserts, go well.
With accent or not, with Ç or not.
When I execute entire script then fail using TIB_Script.
But the same code, same IBO and same script in Delphi 7, run fine.
The same script not fail in IBExpert or FlameRobin.
I think the parser in XE, fails.
In this scripts, there is sentenses that have acute like that:
INSERT INTO IBPT (CODIGO, EX, TABELA, DESCRICAO, ALIQNAC, ALIQIMP, "0_0_2")
VALUES ('12129910', NULL, '0', 'Stevia rebaudiana (Ka’a He’?)', '31.45', '36.20', NULL)
Note that Ka´a have acute (acento agudo) between K and a, and I think that where is the parser fail when use XE.
I still testing every possibility,
But I can´t find any light here.
2015-09-24 11:02 GMT-03:00 'Luiz' cprmlao@... [IBObjects] <IBObjects@yahoogroups.com>:
What about if you remove the “ç”?
Luiz
De: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Enviada em: quinta-feira, 24 de setembro de 2015 10:59
Para: Lista IBObjects
Assunto: Re: [IBO] TIB_Script fails on XE7, but not Delphi7.
Database is charset iso8859_1, but not that, because scripts run fine in Delphi 7, FlameRobin and IBExpert.
I try previous version of IBO, looking for charset threatment for IB_Script or bug and now I´am converting my file to UTF-8 only to study case.
2015-09-24 10:52 GMT-03:00 'Luiz' cprmlao@... [IBObjects] <IBObjects@yahoogroups.com>:
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?