Subject | Re: [IBO] stored procedure and IB_DSQL |
---|---|
Author | Daniel Rail |
Post date | 2003-12-17T18:36:57Z |
Hi,
At December 17, 2003, 13:52, rs@... wrote:
TERM, before and after your CREATE PROCEDURE, as follows:
SET TERM ^ ;
CREATE PROCEDURE...
BEGIN
...
END^
SET TERM ; ^
The second SET TERM is just to reset the terminator back to a
semi-colon.
--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)
At December 17, 2003, 13:52, rs@... wrote:
> I have a problem using IB_DSQL. I try to create a stored procedureUse TIB_Script instead of TIB_DSQL. And, don't forget to use SET
> 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
> I also tried it with : Set Term ^;
> But then an errormessage is shown like : unknown token at line 1
> position 5 : term
> What is wrong with it?
TERM, before and after your CREATE PROCEDURE, as follows:
SET TERM ^ ;
CREATE PROCEDURE...
BEGIN
...
END^
SET TERM ; ^
The second SET TERM is just to reset the terminator back to a
semi-colon.
--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)