Page 1 of 1

Doubt in cursor

Posted: Sat Nov 01, 2008 9:55 pm
by nrajini
Hi,

Kindly Clarify..

If we are passing a value to host variable do we have to move the value before Open cursor or do we have to move it after Open cursor..

Thanks,
Rajini

Posted: Sat Nov 01, 2008 11:12 pm
by dbzTHEdinosauer
before

Posted: Sun Nov 02, 2008 6:15 am
by Natarajan
while executing the program, sql statement wont execute at DECLARE step... program executes the SQL in the DECLARE statement, when it encounters OPEN statement.

so... you need to give the value to host variable before OPEN statement.

Posted: Sun Nov 02, 2008 2:57 pm
by dbzTHEdinosauer
DECLARE's are used by the SQL-Precompiler to generate the data areas that are used in the CALL's generated by SQL Statements other than DECLARE's.