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
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
Is it necessary to draw the picture of jsp for part II?
Alternate flows -- sequence diagrams
Use sequence or select max(field) from table to get next id?
sequence diagram with actor
"JSF compliant" diagram for component diragam