我试图将一些JTable数据保存到数据库中:我的代码是这样的:
public void save(){
String invSL = new Mixed_Calculation().invoice_Sl();
jTextField6.setText(invSL);
int rows = jTable1.getRowCount();
for(int row = 0; row
String code = (String) jTable1.getValueAt(row, 1);
String name = (String) jTable1.getValueAt(row, 2);
String unit = (String) jTable1.getValueAt(row, 3);
String units[] = unit.split(" ");
int q = Integer.parseInt(units[0]);
String u = units[1];
String rate = (String) jTable1.getValueAt(row, 4);
String total = (String) jTable1.getValueAt(row, 5);
String d_rat = (String) jTable1.getValueAt(row, 6);
String discount = (String) jTable1.getValueAt(row, 7);
String net = (String) jTable1.getValueAt(row, 8);
try{
conn = n