inventorymanager.java~8~
来自「小型超市进销存系统 登录界面 进货登记 销售登记 库存查询 jbu」· JAVA~8~ 代码 · 共 51 行
JAVA~8~
51 行
package jxc;/** * <p>Title: jxc demo</p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: </p> * @author cwx * @version 1.0 */import java.sql.*;public class InventoryManager { public InventoryManager() { } static public int queryQty(String wareID){ Connection conn = null; PreparedStatement stmt = null; try { conn = ConnectionManager.getConnection(); stmt = conn.prepareStatement("select * from Reserve where wareID="+wareID); stmt.executeUpdate(); //通过 return true; } catch (java.sql.SQLException e) { System.err.println(e); } finally { //关闭数据库资源 if (stmt != null) { try { stmt.close(); } catch (Exception exception) {} } if (conn != null) { try { conn.close(); } catch (Exception exception) {} } } //失败 return false; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?