Can anyone tell me how to have a block of embedded SQL (Oracle environment) within a Pro-C program, in which I populate an array with the results of a series of cursor fetches, and then use the array in the program outside the
SQL block?
I’ve tried defining it as
EXEC SQL BEGIN DECLARE
VARCHAR arrayname[n][m] ;
EXEC SQL END DECLARE;
within an EXEC SQL DECLARE block, where n is the maximum element size and m is the number of occurrences. As I reference this array within the cursor loop the program will compile, but if I attempt to reference it as a C variable the compiler says that I’m attempting to reference a structure that doesn’t exist.