prisma / tiberius

TDS 7.2+ (Microsoft SQL Server) driver for Rust
Apache License 2.0
321 stars 119 forks source link

Add (n) to datetime2 metadata column #234

Closed tuplecats closed 2 years ago

tuplecats commented 2 years ago

I created table:

create table Test
(
    _Period datetime2(0)   not null
)

When I tried to execute bulk (finalize), i got error: "invalid column attribute from bcp client for colid 1". In profiler I catched INSERT BULK and it's looks like:

INSERT BULK  Test (_Period datetime2)

I suggest adding the n parameter to datetime2. It will solve problem.