Subject RE: [firebird-support] procedure error: isc_dsql_prepare failed (new user)
Author Leyne, Sean
Helen,

> >for which I am receiving an isc_dsql_prepare failed message. The
> procedure code and error message are below. I am using Firebird 2.1
> (classic) on Windows Vista. I have received the error using Flamerobin
as
> well as using isql.
> >
> >ALTER PROCEDURE POPULATE_UF20_CB1
> > Returns (STAFFID integer, STAFFNAME CHAR(30))
> >AS
> >BEGIN
> > SELECT STAFF_ID, STAFF_NAME
> > FROM LIST_STAFF
> > INTO :STAFFID, :STAFFNAME <--- missing semicolon
> >SUSPEND;

> SUSPEND is an unknown token because the parser expects the semicolon
> terminator on the preceding statement.

There is also a missing ";" after STAFFNAME.

Additionally, I think it very unlikely that there is only 1 row in the
List_Staff table, accordingly, a "FOR SELECT ... DO BEGIN SUSPEND; END"
loop is required in order to return the list of rows.


Sean