This is a piece of code written in netbeans on jComboBox1ItemStateChanged event:
try
{
rs2 = st.executeQuery("select distinct visitid from skin where Pid=" + jComboBox1.getSelectedItem().toString());
jComboBox2.removeAllItems();
while(rs2.next())
{
jComboBox2.addItem(rs2.getString(1));
}
}
catch(Exception e)
{
System.out.println(e);
}
i am getting the above mentioned exception!! Plz heellp..!!