/** * Move the physical binary data to this SQL parameter row. * @param statement The SQL prepare statement. * @param iType the type of SQL statement. * @param iParamColumn The column in the prepared statement to set the data. * @exception SQLException From SQL calls. */ public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException { if (this.isNull()) { if ((!this.isNullable()) || (iType == DBConstants.SQL_SELECT_TYPE) || (DBConstants.FALSE.equals(this.getRecord().getTable().getDatabase().getProperties().get(SQLParams.NULL_TIMESTAMP_SUPPORTED)))) // HACK for Access { // Access does not allow you to pass a null for a timestamp (must pass a 0) java.sql.Timestamp sqlDate = new java.sql.Timestamp(0); statement.setTimestamp(iParamColumn, sqlDate); } else statement.setNull(iParamColumn, Types.TIME); } else { java.sql.Time sqlTime = new java.sql.Time((long)this.getValue()); statement.setTime(iParamColumn, sqlTime); } } /**
/** * Move the physical binary data to this SQL parameter row. * @param statement The SQL prepare statement. * @param iType the type of SQL statement. * @param iParamColumn The column in the prepared statement to set the data. * @exception SQLException From SQL calls. */ public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException { if (this.isNull()) { if ((!this.isNullable()) || (iType == DBConstants.SQL_SELECT_TYPE) || (DBConstants.FALSE.equals(this.getRecord().getTable().getDatabase().getProperties().get(SQLParams.NULL_TIMESTAMP_SUPPORTED)))) // HACK for Access { // Access does not allow you to pass a null for a timestamp (must pass a 0) java.sql.Timestamp sqlDate = new java.sql.Timestamp(0); statement.setTimestamp(iParamColumn, sqlDate); } else statement.setNull(iParamColumn, Types.TIME); } else { java.sql.Time sqlTime = new java.sql.Time((long)this.getValue()); statement.setTime(iParamColumn, sqlTime); } } /**
/** * Move the physical binary data to this SQL parameter row. * @param statement The SQL prepare statement. * @param iType the type of SQL statement. * @param iParamColumn The column in the prepared statement to set the data. * @exception SQLException From SQL calls. */ public void getSQLFromField(PreparedStatement statement, int iType, int iParamColumn) throws SQLException { if (this.isNull()) { if ((!this.isNullable()) || (iType == DBConstants.SQL_SELECT_TYPE) || (DBConstants.FALSE.equals(this.getRecord().getTable().getDatabase().getProperties().get(SQLParams.NULL_TIMESTAMP_SUPPORTED)))) // HACK for Access { // Access does not allow you to pass a null for a timestamp (must pass a 0) java.sql.Timestamp sqlDate = new java.sql.Timestamp(0); statement.setTimestamp(iParamColumn, sqlDate); } else statement.setNull(iParamColumn, Types.TIME); } else { java.sql.Time sqlTime = new java.sql.Time((long)this.getValue()); statement.setTime(iParamColumn, sqlTime); } } /**