Subject Re: [ib-support] XCase and Interbase 6
Author Carlo Pettirossi
At 21.27 07/02/01 +0100, you wrote:
>Carlo Pettirossi wrote:
>
>The first statement to set the terminator:
>
> > set TERM^;
>
>[snipped]
>
>
>is not the corollory of the second to reset it:
>
> > set TERM ;^
>
>
>If you look closely in the example I wrote (for the first instance) :
>
>set term ^;
>
>Note the space between term and ^;
>
>
>And please, please, please don't post in html.
>
>Paul
>--

Hi,

I'm here with the damn script generated as before by Xcase once more.
The question is: is it now correct or not?

SET TERM ^;
CREATE TABLE MyTable
(
ID INTEGER NOT NULL,
IDSECONDTABLE INTEGER NOT NULL,
FIELDNAME VARCHAR(50),
FIELDVALUE BLOB SUB_TYPE 1 SEGMENT SIZE 80,
FIELDLINK VARCHAR(100),
CONSTRAINT RDB$PRIMARY56 PRIMARY KEY (ID)
)
^
CREATE TRIGGER T_BI_MyTable FOR MyTable BEFORE INSERT AS
DECLARE VARIABLE row_count INTEGER;
BEGIN

IF (new.IDSECONDTABLE is not null) THEN
BEGIN
SELECT COUNT(*)
FROM SITES
WHERE SECONDTABLE.ID = NEW.IDSECONDTABLE
INTO :row_count ;
IF (row_count = 0) THEN
BEGIN
EXCEPTION xc_i_res ;
END
END
END
^
SET TERM ;^


Anyway the error message is now:

Dynamic SQL Error
SQL error code = -104
Token unknown - line 9, char 17
?
Statement: CREATE TRIGGER .... (then goes on to the end script)

Any suggestion is welcome.
Bye

Carlo