By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,809 Members | 1,999 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,809 IT Pros & Developers. It's quick & easy.

Cursor Not Found

P: n/a
I have an embedded sql program with a while loop. I declare
and open a cursor before the while. The fetch forward next
is inside the while. The first time through the while
the cursor works perfectly the second time I get the error:

sql error PerformPortalFetch: portal "foo_crsr" not found

I have implemented this sequence in other programs and
it has worked flawlessly as it should.

I cannot include the code here as it is proprietary.

I was just wondering if anyone had seen anything like
this before and could possibly shed some light on it.
I am continuing to look on the net for solutions.

Thanks for your help,
Lynn

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Ly********@asu.edu writes:
I have an embedded sql program with a while loop. I declare
and open a cursor before the while. The fetch forward next
is inside the while. The first time through the while
the cursor works perfectly the second time I get the error: sql error PerformPortalFetch: portal "foo_crsr" not found


Sounds like you need to hold a transaction open (BEGIN/END block)
around your use of the cursor.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.