📄 getcustomer.java
字号:
/** * JDBC Stored Procedure ITSO.getCustomer * @param customerID This parameter was generated from the specified SQL Statement. */package itso.storedproc;import java.sql.*; // JDBC classespublic class GetCustomer{ public static void getCustomer ( int customerID, ResultSet[] rs1 ) throws SQLException, Exception { // Get connection to the database Connection con = DriverManager.getConnection("jdbc:default:connection"); PreparedStatement stmt = null; boolean bFlag; String sql; sql = "SELECT CUSTOMERID, TITLE, FIRSTNAME, " + " " + " LASTNAME, USERID, PASSWORD" + " " + " FROM" + " " + " ITSO.CUSTOMER" + " " + " WHERE" + " " + " ITSO.CUSTOMER.CUSTOMERID = ?"; stmt = con.prepareStatement( sql ); stmt.setInt( 1, customerID ); bFlag = stmt.execute(); rs1[0] = stmt.getResultSet(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -