Dear Support Team,
Following code is not working in my environment.
Connect using SQLCA;
integer cmpnt_Id_var
DECLARE my_cursor DYNAMIC CURSOR FOR SQLSA ;
PREPARE SQLSA FROM "SELECT cmpnt_Id FROM Component" ;
OPEN DYNAMIC my_cursor ;
IF SQLCA.SQLCode <> 0 THEN
MessageBox("Database Error", &
"Cannot connect to database " &
+ SQLCA.SQLErrText)
RETURN
END IF
FETCH FIRST my_cursor INTO :cmpnt_Id_var ;
CLOSE my_cursor ;
disconnect using SQLCA;
I cannot get the result value inside the variable "cmpnt_Id_var". Even it will not throw any kind of error and always I get the 0 in "cmpnt_Id_var" variable.
Could you help me what is wrong in this code?