Re: Pro*C & variables
From: Konstantin V.Kustov <kkv_at_laes.sbor.ru>
Date: Tue, 19 Oct 1999 16:37:26 +0300
Message-ID: <940351801.524014_at_relay2.sbor.ru>
Date: Tue, 19 Oct 1999 16:37:26 +0300
Message-ID: <940351801.524014_at_relay2.sbor.ru>
> EXEC SQL DECLARE db_stmt STATEMENT;
> EXEC SQL PREPARE db_stmt FROM :hv_currstmt;
>==> EXEC SQL DECLARE cursorname CURSOR FOR db_stmt;
>
>/* how can I use a variable name as cursorname in this last statement?
> a :cursorname host variable does NOT work */
Actually - you can't. But you're having all stuff to execute your procedure.
All what you need is to do the next statements as next step :
EXEC SQL OPEN db_stmt;
EXEC SQL FETCH db_stmt INTO ...
EXEC SQL CLOSE db_stmt;
Cheers,
Konstantin
Received on Tue Oct 19 1999 - 15:37:26 CEST