Code example for PreparedStatement

Methods: setObject

0
    public void setLong(int idx, long val) throws SQLException {
        ps.setLong(idx, val);
    } 
 
    public void setObject(int idx, Object val) throws SQLException {
        ps.setObject(idx, val);
    } 
 
    public void setBinaryStream(int idx, InputStream stream, int length) throws SQLException {
        ps.setBinaryStream(idx, stream, length);
    } 
 
    public String toString() {
        return ps.toString();
    } 
 
    public void startTransaction() throws SQLException { 
        if (transaction) {
            throw new SQLException("Transaction already started.");
        } 
        transaction = true;