Problems after changed Dialect

Hi,

after i changed the OrmLiteConnectionFactory to

SqlServer2012Dialect.Provider

The Date columns in my database are not mapped when selecting data from DB.

Note i mean Date and not DateTime column

DateTime columns works perfectly.

I can’t tell you what you mean, please provide a stand-alone repro that shows the issue.

Hi again,

my SQLServer datatype is date (without any time).
When selecting data from database the value it’s not mapped to the property using the SqlServer2012Dialect.Provider

0001-01-01 00:00:00 when it should be in exampl 2017-01-01 00:00:00 (as the date stored is 2017-01-01)

Please provide a stand-alone repro, i.e. the code we can run to repro the issue. including the POCO and test db.Insert() data you’re using and code that shows the issue.

Update: When using
SqlServerDialect.Provider it works fine and the date is collected but i need to use SqlServer2012Dialect.Provider as otherwise i dont get the .Take or .Skip to work correctly

I will try to put togheter an example
Where should i send it?

Easiest place is to put it on Github and add a link to it here.

Hi,
just wanted to reply that i solved the problem while creating a smaller demo.
The problem was not the date column but the time column convertion to timespan.
Solved it by adding

SqlServer2014Dialect.Provider.RegisterConverter<TimeSpan>(new SqlServerTimeConverter { Precision = 7 });

Thx for your support!

1 Like