b0bi
b0bi

Reputation: 628

Insert DateTime into SQL Server 2005

How to configure linq2db to use types for SQL Server 2005? Now I'm trying to do an insert command InsertWithIdentity,

I get the error: "The version of SQL Server in use does not support datatype 'datetime2'".

For DateTime columns I put attribute [Column ("DataSert", DataType = DataType.DateTime)], does not help.

Upvotes: 1

Views: 308

Answers (1)

IT.
IT.

Reputation: 878

Try the following connectionString:

<add name="MyName.2005" connectionString="..." providerName="SqlServer" />

or

<add name="MyName" connectionString="..." providerName="SqlServer.2005" />

Upvotes: 3

Related Questions