String sql="Insert into haas1(id,name,major) values('101','hz','电信')";
PreparedStatement pstmt=conn.prepareStatement(sql);int n=pstmt.executeUpdate();
if(n==1){%>数据插入操作成功!<br><%}else{%>数据插入失败!<br><%} if(pstmt!=null){pstmt.close();}if(conn!=null){conn.close();}%>