[SNIP]
> Bradford Young wrote:
>
> > I have an esqlc program that gets a date from the user, converts it
> > (successfully!) into a valid long value, and then uses the date when
> > updating some tables in the database. When I re-wrote the processing
> > from an ESQLC cursor to a stored procedure, I needed to pass the date
> > from my program to the procedure:
> > EXEC SQL EXECUTE PROCEDURE xyz_cursor_calc ( datevalue );
> >
> > the SPL code says:
> > CREATE PROCEDURE xyz_cursor_calc ( mydate DATE ) returning INT;> > ....
> >
> > When I call the SP from dbaccess, it works fine:
> > EXECUTE PROCEDURE xyz_cursor_calc ( "11/26/1999");> >
> > but when I do it from inside my eslqc program I get the
> > less-than-illuminating -201 error.
> >
> > Should I send a text string instead of a long value? If so, why?
Not a string, though that would work, but a type date NOT long. Try:
EXEC SQL BEGIN DECLARE SECTION;
date date_arg;
EXEC SQL END DECLARE SECTION;
date_arg = long_containing_converted_date;
EXEC SQL EXECUTE PROCEDURE xyz_cursor_calc( date_arg );
Art S. Kagel