⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jsp1.jsp

📁 java
💻 JSP
字号:
<%@ page contentType="text/html; charset=GB2312" %>
<%@ page import="java.io.*,java.util.*,java.lang.*,java.sql.*" %>
<%@ page import="erp.html.*,erp.stru.table.*,erp.trade.*,erp.dao.ConnFactory" %>
<html>
<head>
<title>
Jsp1
</title>
</head>
<body>
<%
int iBack = 0;
ConnFactory connFactory = ConnFactory.getInstance();
Connection conn = connFactory.getConnection(connFactory.getConnName());
try {
  String sQuery = "UPDATE dg_main set bcph=?,bchh=? where bcph=? and bchh=?";
  PreparedStatement pstmt = conn.prepareStatement( sQuery );
  pstmt.setString( 1, "aaa" );
  pstmt.setString( 2, "bbb" );
  pstmt.setString( 3, "333" );
  pstmt.setString( 4, "444" );
  iBack = pstmt.executeUpdate();
  pstmt.close();
}
catch ( SQLException e ) {
  iBack = -1;
}
finally {
  connFactory.freeConnection(connFactory.getConnName(),conn);
}
out.println( iBack );
%>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -