con.setAutoCommit(false);stmt = con.createStatement();
        stmt.execute("INSERT INTO  " +tableStr+"( id,number,prod_id,quantity,price,unit,iDate) VALUES('"+theId+"','"+theNumber+"','"+theProd+"','"+theQuantity+"','"+thePrice+"','"+theUnit+"','"+sTheDate"')");
        pstmt=con.prepareStatement("select * from products where prod_id = ?");
        pstmt.setString(1,theProd);
        rs = pstmt.executeQuery();
        rs.next() ;
        float  currentStock = rs.getFloat("stock");
        currentStock = currentStock + theQuantity;
        pstmt= con.prepareStatement("UPDATE  products set stock = "+currentStock+" where prod_id= ?");
        pstmt.setString(1,theProd);
        pstmt.executeUpdate();
        //if(true) throw new SQLException();
        con.commit();上面代码出错,说是连接占线导致另一个 hstmt,大虾教我,什么原因呀??