Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support DateTime2 data type for TimeStamp column #300

Closed
stedel opened this issue Jun 29, 2020 · 0 comments · Fixed by #301
Closed

Support DateTime2 data type for TimeStamp column #300

stedel opened this issue Jun 29, 2020 · 0 comments · Fixed by #301

Comments

@stedel
Copy link
Contributor

stedel commented Jun 29, 2020

The sink supports SqlDbType DateTime2 in custom columns without problems. The TimeStamp column does not support it yet though.
Setting the data type manually on the TimeStamp object yields a InvalidCastException when the Sink is trying to flush the log entries. Enabling SelfLog logs: Unable to write 1 log events to the database due to following error: Unable to cast object of type 'System.DateTime' to type 'System.DateTimeOffset'.

The underlying database uses DateTime2 in the TimeStamp column instead of the default DateTime or recently supportedDateTimeOffset.

I don't see a reason, why DateTime2 should not be supported on TimeStamp. As discussed in #187 this addition does not affect the defaults and therefore should be backwards compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant