Subject Re: problem with very simple Stored Procedure
Author duilio_fos
Alan,

> version 1.6 Build 16 with IBObjects 3.4.B

same version as the one I am using.

Please follow exactly the following steps:

1. create generator NEW_ID

2. execute the following code (in Marathon SQL editor)

create procedure newid
returns (RESULT integer)
as
begin
result=GEN_ID(NEW_ID, 1);
end

3. you should get the following error message:

"ISC ERROR CODE 335544569 - ISC ERROR MESSAGE - Dynamic SQL error -
SQL Error code= -104 - unexpected end of command"

4. take the same code and paste it into the IB_SQL editor

5. the code is executed successfully and you will be able to see the
SP correctly listed by Marathon among the other SPs

6. following Helen's advice, re-write the code as:

SET TERM ^;
create procedure newid
returns (RESULT integer)
as
begin
result=GEN_ID(NEW_ID, 1);
end ^
SET TERM ; ^

7. this works ok (but it is a pain in the neck).

The "set term" command should not be necessary when the command is
given interactively.

Marathon version 15 - to say one - did not require it.

As a result, I expect the problem to be fixed in Marathon's next
build.

Best regards

Duilio