Home » Developer & Programmer » Precompilers, OCI & OCCI » Cursor Question
Cursor Question [message #94164] Mon, 12 April 2004 18:12 Go to next message
Steve
Messages: 190
Registered: September 1999
Senior Member
Having Trouble, hope to post question in reply.

s

 
Re: Cursor Question [message #94165 is a reply to message #94164] Mon, 12 April 2004 18:13 Go to previous messageGo to next message
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 Go to previous messageGo to next message
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 Go to previous message
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
Previous Topic: oci creation of data base schema
Next Topic: Pro*C compile error
Goto Forum:
  


Current Time: Sat Mar 02 16:25:39 CST 2024