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 . TIMESTAMP ) ; } else { java . util . Date time = ( java . util . Date ) this . getData ( ) ; Converter . initGlobals ( ) ; Converter . gCalendar . setTime ( time ) ; //x if (Converter.gCalendar.getTimeZone().inDaylightTime(time)) // Hack (DST Problem?) //x Converter.gCalendar.add(Calendar.MILLISECOND, Converter.gCalendar.getTimeZone().getDSTSavings()); java . sql . Timestamp sqlDate = new java . sql . Timestamp ( Converter . gCalendar . getTimeInMillis ( ) ) ; statement . setTimestamp ( iParamColumn , sqlDate ) ; } }
Move the physical binary data to this SQL parameter row . This method used the setTimestamp statement method .