Subject Re: [firebird-support] Insert within a stored procedure not inserting records
Author Ann W. Harrison
Peter Welch wrote:
> I am trying to Insert within a stored procedure but it does not work -

Err, I'm surprised it compiles.
>
> The following is the metadata:
>
> Create PROCEDURE INS_SC ( MRN INTEGER
> , ADMITDATETIME TIMESTAMP
> , STATUS CHAR( 1 ) )
> AS
> BEGIN
>
> insert into sc_list
> (mrn, admitdatetime, status)
> values (? /* PRM_0 */ , ? /* PRM_1 */ ,? /* PRM_2 */ );
>
> END

should be

create procedure INS_SC (MRN intege, AdmitDateTime timestamp,
STATUS (char(1))
as begin

insert into sc_list (mrn, admitdatetime, status)
value (:MRN, :AdmitDateTime, :status);

end


Good Luck,


Ann