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

Bulk insert problem with SQL Server datetime2 type #604

Open
jboia opened this issue Jul 25, 2024 · 1 comment
Open

Bulk insert problem with SQL Server datetime2 type #604

jboia opened this issue Jul 25, 2024 · 1 comment

Comments

@jboia
Copy link

jboia commented Jul 25, 2024

I'm having trouble with the ctlib blk_* feature, can't get datetime2 to work. SQL Server 2019, TDS 7.4. Same problem with src/ctlib/unittests/blk_in -- if I change not_null_datetime to be a datetime2 type, it fails with server message:
Message 4895 severity 16 state 2 line 1:
"Unicode data is odd byte size for column 4. Should be even byte size."
The datetime2 type works fine with my other applications using straight ctlib interface, so perhaps it's something obscure in the blk_* routines. I've tried a number of tweaks with no success. If I change my code to use datetime type (not a viable option for my application), it works fine. Would appreciate someone taking a look.

@freddy77
Copy link
Contributor

Apparently the function supposed to convert data to server format is not doing the right thing in this case.
Seeing if it's easy to fix.

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

No branches or pull requests

2 participants