Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What are the JDBC drivers which support calling absolute method on ResultSet of forward only ?  RSS feed

 
Narayana Bojja
Ranch Hand
Posts: 139
4
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Every one,

I have question  which is similar to this question which asked almost 10 years back. ResultSet. But there is no expected answer.  If ResultSet  type is forward only , you can read data in only forward direction. we can't apply absolute method on that ResultSet as per JDBC API specification . I tried sample example using Mysql databese . It allows reading ResultSet (forward only) in both forward and backward. I am able to apply absolute method .  The same question is asked in Mysql forum Mysql forum
So , I what want to know is What are the  JDBC drivers which allowes both  forward and backward readind data from ResultSet (forward only) ?. If a question asked in OCPJP exam of this type, Which standard we need to follow ? I mean Do we need to follow according to JDBC documentation ( or API ) ? or Do we need to follow according to  specific driver implementation ?

 
Tim Moores
Saloon Keeper
Posts: 3881
91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This generally depends on the combination of a specific DB and a specific JDBC driver, so there is no general answer. I don't believe the JDBC spec says that a driver that's labelled as forward-only can't allow absolute access; it merely states it is not required to support that, and might throw an exception to that effect if you try.
 
Narayana Bojja
Ranch Hand
Posts: 139
4
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim Moores,

Thanks for your reply. I understand. I need answer for another question . For OCPJP examination point of view ,  we need to follow JDBC documentation only right ? Please share your suggestions ?
 
Tim Moores
Saloon Keeper
Posts: 3881
91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea about certifications. I'll add this topic to the appropriate cert forum; maybe someone there knows.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37221
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need to know about specific drivers for the exam.

If it is relevant, the question will tell you what you can assume about what the driver supports. For most questions:
1) The pretend driver supports everything
or
2) You need to know what happens under each possibility (aka that certain code could throw an exception)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!