Subject | Re: [firebird-support] Re: ISQL & trigger -- this worked at last !!! |
---|---|
Author | Helen Borrie |
Post date | 2004-10-04T14:24:58Z |
At 02:08 PM 4/10/2004 +0000, you wrote:
A statement class encapsulates a single SQL statement.
A script (which I believe is not implemented in the JDBC driver) is a file
of multiple statements. You run scripts in isql. (Some other object
interfaces, such as IBObjects, for Delphi and Kylix, do have classes that
encapsulate a script.) Some tools support running scripts, but not the
Mitec Query Tool.
A CREATE TRIGGER or CREATE PROCEDURE statement is not a "multi-line
statement". It is a single DDL statement that encloses at least three PSQL
( = "procedure SQL") statements.
PSQL statements (currently) can only occur in a procedure or trigger
definition. PSQL statements - except BEGIN and END - must always be
terminated by a semicolon.
Therefore, if you define a trigger in a script, you must set the terminator
for all DDL statements (including the statement in which you are defining
the trigger or procedure) to be something that is NOT a semicolon.
READ THE LANGUAGE REFERENCE MANUAL.
./heLen
>Thanks everyone for the help !!No.
>If I correctly undestood, I will could insert multiline statament
>trought a JDBC connection without having to work with set term
>statements at all.
>Am I right ?
A statement class encapsulates a single SQL statement.
A script (which I believe is not implemented in the JDBC driver) is a file
of multiple statements. You run scripts in isql. (Some other object
interfaces, such as IBObjects, for Delphi and Kylix, do have classes that
encapsulate a script.) Some tools support running scripts, but not the
Mitec Query Tool.
A CREATE TRIGGER or CREATE PROCEDURE statement is not a "multi-line
statement". It is a single DDL statement that encloses at least three PSQL
( = "procedure SQL") statements.
PSQL statements (currently) can only occur in a procedure or trigger
definition. PSQL statements - except BEGIN and END - must always be
terminated by a semicolon.
Therefore, if you define a trigger in a script, you must set the terminator
for all DDL statements (including the statement in which you are defining
the trigger or procedure) to be something that is NOT a semicolon.
READ THE LANGUAGE REFERENCE MANUAL.
./heLen