Here you can find the source of getPreparedStatement(Connection conn, String sql)
public static PreparedStatement getPreparedStatement(Connection conn, String sql)
//package com.java2s; //License from project: Apache License import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import com.mysql.jdbc.Statement; public class Main { public static PreparedStatement getPreparedStatement(Connection conn, String sql) {/*from w w w. j a v a 2s. c o m*/ try { return conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } }