Subject Re: [firebird-support] procedure error: isc_dsql_prepare failed (new user)
Author A C
Thank you Helen and Sean. I have it working now.





________________________________
From: "Leyne, Sean" <Sean@...>
To: firebird-support@yahoogroups.com
Sent: Monday, March 16, 2009 3:31:29 PM
Subject: RE: [firebird-support] procedure error: isc_dsql_prepare failed (new user)


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







[Non-text portions of this message have been removed]