Subject | RE: [IBO] A problem with a procedure |
---|---|
Author | Malcolm Smith |
Post date | 2004-11-26T06:19:13Z |
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
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
'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
>Yes. A cursor is needed for a stored procedure that loops through a set
>Can this be explained ? Should I remove the SUSPEND
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