Java examples for java.sql:PreparedStatement
get PreparedStatement
//package com.java2s; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; public class Main { public static PreparedStatement getPrepStatement(Connection conn, String sql) {/* www .ja va 2 s.co m*/ PreparedStatement prepStmt = null; try { prepStmt = conn.prepareStatement(sql); } catch (SQLException e) { e.printStackTrace(); } return prepStmt; } }