Skip to content

Commit

Permalink
Fix | Allow non-MSSQL ResultSets to bulk copy DateTimeOffset
Browse files Browse the repository at this point in the history
Allow non-MSSQL ResultSets to bulk copy DateTimeOffset
  • Loading branch information
peterbae authored Jun 23, 2020
1 parent 559577f commit 8e8a765
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2926,9 +2926,7 @@ private Object readColumnFromResultSet(int srcColOrdinal, int srcJdbcType, boole
return sourceResultSet.getDate(srcColOrdinal);

case microsoft.sql.Types.DATETIMEOFFSET:
// We can safely cast the result set to a SQLServerResultSet as the DatetimeOffset type is only
// available in the JDBC driver.
return ((SQLServerResultSet) sourceResultSet).getDateTimeOffset(srcColOrdinal);
return sourceResultSet.getObject(srcColOrdinal, DateTimeOffset.class);

case microsoft.sql.Types.SQL_VARIANT:
return sourceResultSet.getObject(srcColOrdinal);
Expand Down

0 comments on commit 8e8a765

Please sign in to comment.