Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

cursor stop when go to the first or last record  RSS feed

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi to all!!!


i have the problem with cursor on database...

example..for movie to next i write:



but when i go to last record show error!!! why???
 
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What error message does it give? It probably provides a hint as to what the problem is.

I will hazard a guess though. what is the value of position when the error occurs? What is the value of cursor.getCount()? How are the positions in Cursor.getPosition(int) indexed?
 
paul beppe
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Steve thank's for reply...


i have rewrite the code...but i have same problem....

this is code:


help me please!!!
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may want to start by answering the 4 questions Steve asked. What debugging have you done as a result of his post?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!