Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: What is the meaning of this code? if(code.next()) [duplicate]

BloodLoss:

This question already has an answer here:

  • What does “if (rs.next())” mean? 7 answers

String id = (jTable1.getValueAt(row, 4).toString());

int x = JOptionPane.showConfirmDialog(this, "Do You Want To Delete This Author ?", "Confirmation", JOptionPane.YES_NO_OPTION);

if (x == 0) {

try{

ResultSet code = DB.getdata("SELECT bm_id FROM book_master WHERE au_id='"+id+"'");

if(**code.next()**){

DB.setdata("UPDATE author SET activestatus='0' WHERE author_id='"+id+"'");
}

else{

DB.setdata("DELETE FROM author WHERE author_id='"+id+"'");
}



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: What is the meaning of this code? if(code.next()) [duplicate]

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×