Dear friends,
please see the following code ;
try {
aset.first();
String author_entered=jComboBox3.getSelectedItem().toString().trim();
while (aset.getString("authorname").trim()!=author_entered)
{aset.next();}
anand.jset("insert into public.subject (subject,aid) values ('"+jComboBox1.getSelectedItem()+"','"+aset.getString(1)+"'");}
catch (Exception E) {System.out.println(E.getMessage());}
THE WHILE Loop over here continues even after it finds exactly equal values of aset.getString("authorname") and author_entered. I have checked their lengths too. They are also the same. I dont understand why it keeps on doing next and reaches the end of resultset.
Please help.