Subject Re: Building a statement at runtime
Author paolopf
Ciao, lele
I try to explain better.
I've created, in the sql explorer, a new procedure:
CREATE PROCEDURE PROCEDURE1 AS
declare variable C0 varchar(100);
declare variable C1 varchar(100);
declare variable C2 varchar(100);
declare variable C3 varchar(100);
declare variable C4 varchar(100);
BEGIN
C1 = 'INSERT INTO PIANIF(MINUTI, ';
C2 = 'CLV2) ';
C3 = 'VALUES(1, ';
C4 = '"00003")';
C0 = C1+C2+C3+C4;
C0;
END
After clicking "Apply" the error message is:
General SQL error
Token unknown - line 13, char 1
;
=============================
In IB_WISQL the error is:
------------------
Page Error message
ISC ERROR CODE:335544569

ISC ERROR MESSAGE:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 13, char 1
;

STATEMENT:
TIB_DSQL: "frmDSQL.dsqlEdit"
------------------
Page SQL message
SQL ERROR CODE:-104

SQL ERROR MESSAGE:
Invalid token
=============================

Ciao,
Paolo