Subject Re: [IBO] Calling an INSERT procedure
Author Lucas Franzen
yaedos2000 schrieb:

>
> Hi,
>
> I've developed the following procedure for inserting data into a
> table:
>
> SET TERM ^ ;
>
> CREATE PROCEDURE PRO_INSERT_ACCOUNT (
> IN_VAR1 VARCHAR(10),
> IN_VAR2 VARCHAR(10))
> AS
> begin
> /* Procedure Text */
> INSERT INTO TBL_HACS VALUES (:IN_VAR, :IN_VAR2);
> suspend;

Suspend is nonsense in that case.

> end
> ^
>
> SET TERM ; ^
>
> I'm using a TIB_Query component to call this procedure with the
> following SQL command:
>
> INSERT INTO PRO_INSERT_ACCOUNT VALUES (IN_VAR1, IN_VAR2)

You're trying to insert into a stored procedure.
But you can only insert into tables.

Use a TIB_DSQL for that, enter :

INSERT INTO PRO_INSERT_ACCOUNT VALUES (:IN_VAR1, :IN_VAR2)

in the SQL property and if you're going to do the insert do sth. like:

myDSQL.Prepare;
myDSQL.ParamByname ( 'IN_VAR1' ).AsWhatOever := MyValue;
...
myDSQL.Execute;

Luc.