aspose file tools*
The moose likes JDBC and the fly likes problem with sequence Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "problem with sequence " Watch "problem with sequence " New topic
Author

problem with sequence

gvasu kumar
Greenhorn

Joined: Jul 19, 2005
Posts: 6
hi all,
in my application i am using the Oracle Sequence for generating the sequence of numbers.how can i invoke the sequence from the JDBC.
Thanx in advance
gvasu kumar
Greenhorn

Joined: Jul 19, 2005
Posts: 6
sorry i forgot to say i am using preparedstatement
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

I believe it is 'select <sequence_name>.next from dual' but I'd have to go check. I'm sure someone will correct me soon if I'm wrong.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Not quite right, it should be 'nextval', not 'next'.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with sequence
 
Similar Threads
"JSF compliant" diagram for component diragam
sequence diagram with actor
Is it necessary to draw the picture of jsp for part II?
Use sequence or select max(field) from table to get next id?
Alternate flows -- sequence diagrams