• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where is the cursor after we execute a query with statement ?

 
raminaa niilian
Ranch Hand
Posts: 551
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for reading my post.
imagine that you execute a query with stetement something like

where is cursor of rs now ?
is it in first , is yes does first means first record or it is before first record ?

Thank you
[ January 30, 2006: Message edited by: raminaa niilian ]
 
Thara Visu
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe its before the first record.
You need to traverse to the first record using rs.next() to get to the first record.
 
chirs blr
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its before the first record
ypu have to move it to first
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... so the typical loop that precesses a result set looks like:

... rather than some freaky do/while loop to test at the loop's bottom!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic