try { String query="insert into category_2 (catname)values(?)"; pst=conn.prepareStatement(query); pst.setString(1,jTextField18.getText()); pst.execute(); JOptionPane.showMessageDialog(null,"Category Added Sucessfully"); pst.close(); } catch (Exception e1) { e1.printStackTrace(); }
category_2
catname
select count(catname) from category_2
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)