台灣最大程式設計社群網站
線上人數
960
 
會員總數:245475
討論主題:189234
歡迎您免費加入會員
討論區列表 >> Oracle >> fetch out of sequence
[]  
[我要回覆]
1
回應主題 加入我的關注話題 檢舉此篇討論 將提問者加入個人黑名單
fetch out of sequence
價值 : 20 QP  點閱數:2141 回應數:1

樓主

Youme
門外漢
0 1
30 1
發送站內信

各位大大好,小弟也遇到相同的fetch out of sequence的問題
但是我的PROCEDURE裡面沒有下for update的語法,
且也有其它PROCEDURE的格式是一樣的,
也有測試一筆是可以執行,但是兩筆以上就不行了,想請問是否有人可以解答。
謝謝。

搜尋相關Tags的文章: [ oracle ] , [ ora-01002 ] , [ fetch ] , [ sequence ] ,
本篇文章發表於2013-07-26 16:49
別忘捐VP感謝幫助你的人 新手會員瞧一瞧
1樓
回應

花旗蔘
檢舉此回應
01002. 00000 - "fetch out of sequence"
*Cause: This error means that a fetch has been attempted from a cursor
which is no longer valid. Note that a PL/SQL cursor loop
implicitly does fetches, and thus may also cause this error.
There are a number of possible causes for this error, including:
1) Fetching from a cursor after the last row has been retrieved
and the ORA-1403 error returned.
2) If the cursor has been opened with the FOR UPDATE clause,
fetching after a COMMIT has been issued will return the error.
3) Rebinding any placeholders in the SQL statement, then issuing
a fetch before reexecuting the statement.
*Action:
1) Do not issue a fetch statement after the last row has been
retrieved - there are no more rows to fetch.
2) Do not issue a COMMIT inside a fetch loop for a cursor
that has been opened FOR UPDATE.
3) Reexecute the statement after rebinding, then attempt to
fetch again.

---->
ora-01002的error message 已列出滿詳盡的線索及解決辦法,review 一下自己的語法 看
符合那種cause,再依對應的action來處理,若還是無法解決,把語法貼上來看看吧!
本篇文章回覆於2013-07-28 15:38
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
   
1

回覆
如要回應,請先登入.