Subject RE: [IBO] A problem with a procedure
Author Malcolm Smith
I did this (before sending the original email):

'EXECUTE PROCEDURE P_LP_SELECT_ONE (:LP_PROCESSNAME_IN)'

and it didn't work (whether I use SUSPEND in the script or not).

I've tried again and I get an exception:

ISC ERROR CODE: 335544569
Dynamic SQL Error
SQL error code = -104
Token Unknown - line 1, char 19
FROM


My code uses a TIB_Cursor since all of my other requests return more than
one record.

What else might I be doing wrong ?


Malcolm Smith
Analyst Programmer
Comvision Pty Ltd
http://www.comvision.net.au


-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Friday, 26 November 2004 17:01
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] A problem with a procedure


>
>Can this be explained ? Should I remove the SUSPEND

Yes. A cursor is needed for a stored procedure that loops through a set
and outputs (potentially) multiiple rows. A cursor is established in a SP
with a FOR..SELECT loop. You use SUSPEND for cursors.

Your SP isn't a selectable SP, it's an executable one. It has no cursor.
You should be calling the procedure by calling the Execute method on an
EXECUTE PROCEDURE statement and reading the Fields[] array to get the
result. Use TIB_Cursor or TIB_DSQL for your statement object.

Helen