Subject Re: [IBO] TIb_Script to create stored procedure
Author Frank Ingermann
Hi Mike,

Mike Terry wrote:
>
> Hello all,
>
> I want to be able to create my database from within my application and want to use sql ddl commands to do it. I created a data module and placed a series of TIb_Script components on it. There is one for domains and one for each table.
>
> So far I'm able to use CreateDatabase to create the empty database and then execute the scripts to define the domains and tables. Where I'm having trouble is in defining stored procedures.

what trouble do you have? (i.e. what error do you get with what statement?)

> Can anyone give me an example of a "create procedure" call that will work from within a TIb_Script component?
>
> Thanks
>
> Mike

well..

create procedure foo(inparam integer)
returns (outparam integer)
as
begin
outparam = inparam;
end

this was the most trivial i could think of ;-) but that was
probably not your problem - maybe it has to do with SET TERM:

set term ^;
create procedure foo(inparam integer)
returns (outparam integer)
as
begin
outparam = inparam;
end
^
set term ;^

look for SET TERM in the LangRef.pdf in that case.

or maybe you want to use a little tool for it? look at
http://www.fingerman.de/fbspgenerator_screenshots.htm ,
i would appreciate a beta tester or two... ;-)

regards & hth,
fingerman

-------------------------------------------------------------------------
when parsers parse, and compilers compile, then why don't objects object?

fingerbirdy - fingerman's door to Firebird
http://www.fingerbird.de