Hi,
I think you need to prefix
string values with single quote ('), like I am doing for 'st_descriptionst' in the following line ...
PreparedStatement st_stockaddps=st_stockaddcon.prepareStatement(
"INSERT INTO inventory VALUES("+st_itemcodest+","+"'"+st_descriptionst+"'"+","+st_ppust+","+st_qtyst+","+st_reorderlevelst+","+st_suppliercodest+","+st_totalcostst+","+st_totalcostst+")");
OR
String sqlStr = new String ("INSERT INTO inventory VALUES (?, ?, ?, ?, ?, ?, ?, ?)");
PreparedStatement st_stockaddps = st_stockaddcon.prepareStatement(sqlStr);
st_stockaddps.setInt(1, st_itemcodest);
st_stockaddps.setString(2, st_descriptionst);
//set all the parameters in the same way
st_stockaddps.executeUpdate();
Thanks,
Vani Yama