Subject Problem in Binding Cursor error when running stored proc
Author robertgilland
I am running a stored proc as below,
and I am getting a "Problem in Binding Cursor" error.
What is that?

Regards,

Robert.

CREATE PROCEDURE PROC_EXT_DOGSALES
AS
DECLARE VARIABLE THEMASTERID VARCHAR(10);
DECLARE VARIABLE THESALESDATE TIMESTAMP;
DECLARE VARIABLE THEDOG VARCHAR(14);
DECLARE VARIABLE THEQUANTITYSOLD FLOAT;
DECLARE VARIABLE THESALESEXGST FLOAT;
DECLARE VARIABLE THECOSTEXGST FLOAT;
DECLARE VARIABLE THESALESINCGST FLOAT;
DECLARE VARIABLE THECOSTINCGST FLOAT;
BEGIN
FOR SELECT RTRIM(MASTERID)
,CAST(SALESDATE AS TIMESTAMP)
,RTRIM(DOG)
,CAST(QUANTITYSOLD AS FLoAT)
,CAST(SALESEXGST AS FLOAT)
,CAST(COSTEXGST AS FLOAT)
,CAST(SALESINCGST AS FLOAT)
,CAST(COSTINCGST AS FLOAT)
FROM
EXT_DOGSALES
INTO
:THEMASTERID
,:THESALESDATE
,:THEDOG
,:THEQUANTITYSOLD
,:THESALESEXGST
,:THECOSTEXGST
,:THESALESINCGST
,:THECOSTINCGST
DO
BEGIN
INSERT INTO DOGSALES
(MASTERID
,SALESDATE
,DOG
,QUANTITYSOLD
,SALESEXGST
,COSTEXGST
,SALESINCGST
,COSTINCGST)
VALUES
(:THEMASTERID,
:THESALESDATE,
:THEDOG,
:THEQUANTITYSOLD,
:THESALESEXGST,
:THECOSTEXGST,
:THESALESINCGST,
:THECOSTINCGST);
WHEN SQLCODE -803 DO
BEGIN
UPDATE DOGSALES
SET
QUANTITYSOLD = :THEQUANTITYSOLD,
SALESEXGST = :THESALESEXGST,
COSTEXGST = :THECOSTEXGST,
SALESINCGST = :THESALESINCGST,
COSTINCGST = :THECOSTINCGST
WHERE ( MASTERID = :THEMASTERID )
AND( SALESDATE = :THESALESDATE )
AND( DOG = :THEDOG );
END
END
END;