• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

stumped rt now

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what does seq.nexval returns when fired from a java program?
 
Ranch Hand
Posts: 1087
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Similar behaviour as in database. It will return next value of sequence


Shailesh
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by siddharth sharma:
what does seq.nexval returns when fired from a java program?



You should try it out yourself mate, prior to post questions. In case of wiered result, we are here to guide you through. By practicing this you will surely learn more.

Anyways, you have got the answer.
 
siddharth sharma
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
actually i framed it wrong i guess.. my problem was that i was not not sure what select seq.nextval returns in java i.e what resultset i get when i fire this query..anyways i got the answer... as u said "try tourself first"...

SQL = "SELECT XSELL_SCRIPTID_SEQ.NEXTVAL FROM DUAL";
while (rs.next())
{
number = rs.getInt(1)+ "";
}
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Great. It is really appreciated.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Siddharth,
Welcome to JavaRanch!

Thanks for posting the solution (code to get the solution) for people who read this thread in the future.
reply
    Bookmark Topic Watch Topic
  • New Topic