Subject | Re: [IBO] Calling an INSERT procedure |
---|---|
Author | Lucas Franzen |
Post date | 2004-12-13T15:18:15Z |
yaedos2000 schrieb:
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.
>Suspend is nonsense in that case.
> 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;
> endYou're trying to insert into a stored procedure.
> ^
>
> 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)
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.