Jijesh T Das wrote:executeUpdate .getString(hoursused ) willl extract the required value.
But don't forget to navigate to the first record in the resultset before calling ResultSet.get...()
OCUP UML fundamental and ITIL foundation
Jijesh T Das
Joined: Sep 27, 2007
Joined: Dec 23, 2008
Thanks for the replies....I am just curious...shouldn't it be executeQuery instead of executeUpdate??. Anyway based on the advise given, I have managed to get it to work. For the benefit of those caught in a simillar predicament as me, I am posting the code below:
Varnam Aayiram wrote:..shouldn't it be executeQuery instead of executeUpdate...
True. executeUpdate has some additional functionality that you don't need in a select statement (see javadoc for more info, it's related to auto generated keys). It is a proper approach to use executeQuery for select statements.