|
Re: Cursor Question [message #94165 is a reply to message #94164] |
Mon, 12 April 2004 18:13 |
Steve
Messages: 190 Registered: September 1999
|
Senior Member |
|
|
Hi,
I have a C project with many smaller files (based on functions) Before separating the project into many smaller files, I was able to nest SQL commands within a cursor loop.
Now that I have many small files, I must do the complete DECLARE section at the top of each function. This new DECLARE section seems to wipe out the pointer into the cursor, causing the first rowset to be reiterated forever.
example in next reply.
steve
|
|
|
Re: Cursor Question [message #94166 is a reply to message #94165] |
Mon, 12 April 2004 18:13 |
Steve
Messages: 190 Registered: September 1999
|
Senior Member |
|
|
code snippet:
...
for(;;)
{
exec cursor into :a
nextfunc(a);
}
...
void nextfunc(int a)
{
DECLARE...
CONNECT...
EXEC SQL select blah blah blah where blah= :a;
printf("%s", blah);
}
|
|
|
Re: Cursor Question [message #94167 is a reply to message #94166] |
Mon, 12 April 2004 18:17 |
Steve
Messages: 190 Registered: September 1999
|
Senior Member |
|
|
sorry for the 4 posts. i had tonnes of problems posting this. admittedly, i am pulling out my hair trying to figure out the ProC weird-ism.
thanks in advance,
steve
|
|
|