Skip to content

Different behavior between SQL Server 2016 and SQL Server 2008 R2 #606

@labilbe

Description

@labilbe

Hi,

Symptoms

My code runs fine on SQL Server 2016 (dev) but throws SqlException with message 'CONCAT' n'est pas une option nom de fonction intégrée reconnue. Syntaxe incorrecte vers 'Clients'. Syntaxe incorrecte vers 'Clients'. in SQL Server 2008 R2.

Explanation

I am using ServiceStack.OrmLite on a database hosted on SQL Server 2016 (dev env) and same code is applied to SQL Server 2008 R2 (prod env).
I know CONCAT function is not supported on SQL Server 2008 R2, and I would like to know if it is possible to force something like SqlServer2008Dialect.Provider, so the generated function will not be using CONCAT.
In consequence I am using something like that var dbFactory = new OrmLiteConnectionFactory(ConfigurationManager.ConnectionStrings["mydatabase"].ConnectionString, SqlServerDialect.Provider).
My version of ServiceStack is 4.5.14.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions