Skip to content

TinyTds::Error: Cannot insert an explicit value into a timestamp column. Use INSERT with a column list to exclude the timestamp column, or insert a DEFAULT into the timestamp column. (ActiveRecord::StatementInvalid) #1328

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

Open
maxingjia1314 opened this issue May 8, 2025 · 1 comment

Comments

@maxingjia1314
Copy link

maxingjia1314 commented May 8, 2025

I used examples such as
Model. create! ({key: value})

An error occurred
TinyTds::Error: Cannot insert an explicit value into a timestamp column. Use INSERT with a column list to exclude the timestamp column, or insert a DEFAULT into the timestamp column. (ActiveRecord::StatementInvalid)

I did not assign a value to the timestamp field, but still reported this error, even if I only kept one field

Ruby Version 3.3.3
Rails 7.0.8.6
activerecord-sqlserver-adapter (7.0.7)

@aidanharan
Copy link
Contributor

Could you create a script that recreates the issue? See https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/wiki/How-to-report-a-bug

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

No branches or pull requests

2 participants