简体   繁体   中英

how to get nextvalue of sequence from oracle_database and show it in JOptionPane in netbeans using oracle 10g?

the above code is executing ie the sequence value is incrementing but since i want to show that sequence no. in JOptionPane by taking that sequence value as string, it is not happening. as soon as i click on button an exception is occurring.

see the image to understand more easily. screenshot of CODE

You call rs.getString() before you call rs.next() . Can't do that.

Without a next() call, there is no "current" row for getString() to retrieve values from.

Besides, why are you executing the query twice?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM