Re: ESQL/C cursor looping
Posted in 1996
Mike Segel (mikey@segel.com) wrote: : Allen W. Jantzen wrote: : > : > In ESQL/C when I am cycling through the rows returned by a cursor, if : > an error occurs on the fetch (say, SQLCODE=-244 record locked), does : > it make any sense to attempt to keep fetching additional rows?? Subsequent FETCHs will re-attempt to fetch the same row, and if the row is still locked, you will still get -244. The next FETCH will NOT skip the locked row to move on to the next row. However, the person who had the row locked may have released it by your next FETCH, then you would get the row. : > Or is the whole cursor (and any remaining rows) screwed up at that : > point and I should just immediately bail out of the loop ??? : > : If you are doing page locking and all the rows will be in the same page, : then : you might as well punt. It all depends on your design of the app and : database. It doesn't really matter what type of locking you are using. The cursor isn't "screwed up", it's just "stuck" at this row until it is unlocked. June ---- June Tong Informix Software ---- ---- Senior Consultant (415) 926-6140 ---- ---- International Support junet@informix.com ---- ---- Location-du-jour: Menlo Park ---- - - Please do not send me requests/questions by mail. When I have the knowledge - and time permits, I try to answer questions on comp.databases.informix, but - travel schedule, time, and volume make responding to personal requests - difficult and often slow. Please call your local Informix Technical Support - organization for assistance with technical issues.