Subject Re: [IBO] stored procedure and IB_DSQL
Author Helen Borrie
At 05:52 PM 17/12/2003 +0000, you wrote:
>Hi,
>
>I have a problem using IB_DSQL. I try to create a stored procedure
>as follows :
>
>create procedure saw_getarttext (artikelnr varchar(20),
> groesse varchar(10))
>returns (text varchar(255))
>as
>
>begin
> select artikeltext from Artikel
> where artikelnr = :artikelnr
> and groesse = :groesse
> into :text;
>
> suspend;
>end
>
>the following code shows an error :
>
>IB_DSQL1.SQL.LoadfromFile('C:\saw_getarttext.prc');
>if IB_Transaction1.InTransaction then IB_Transaction.Commit;
>IB_Transaction.StartTransaction;
>IB_DSQL1.Execute; // or IB_DSQL1.ExecSQL; same error occurs
>IB_Transaction.Commit;
>
>An errormessage is shown like :
>Unkown Datatype : 0

This usually happens in the IB_SQL tool's DSQL tab, if you forget to check
off the Params flag when compiling your SP.

But Daniel is right - using scripts is a more wholesome approach for DDL,
than creating objects interactively.

Helen