Subject Date parameter error
Author Gerhardus Geldenhuis
Hi all

I'm writing a select procedure (TEST2) that must return a resultset of data.
When I use an input parameter of type date I get an error: Conversion error
from string "0". I used an input parameter of type date in an execute
procedure (TEST1) and it worked fine.

Here's the code:


SET TERM ^! ;
CREATE PROCEDURE TEST1 (DATUM Date) returns (MASSAVERKOPE Double Precision)
AS

BEGIN
SELECT SUM(HOEVEELHEID)
FROM MASSAVERKOPE
WHERE DATUM = :DATUM
INTO MASSAVERKOPE;
END

^!
SET TERM ; ^!



SET TERM ^! ;
CREATE PROCEDURE TEST2 (DATUM Date) returns (PAKHUIS Char(10), KULTIVAR
Char(30)) AS

BEGIN
FOR SELECT
PAKHUIS,
KULTIVAR
FROM DAAGLIKSE_PAKHUISBESTUUR
WHERE DATUM = :DATUM
INTO
:PAKHUIS,
:KULTIVAR
DO BEGIN
SUSPEND;
END
END

^!
SET TERM ; ^!


Any Comments ???

Pieta Heyns