Subsonic and SQL Server 2014 Web Edition

285 Views Asked by At

We have just upgraded our database from SQL Server Express to SQL Server 2014 Web Edition.

We are also, and don't ask me why, using Subsonic as our database provider.

As soon as we pointed our code to the new SQL 2014 edition we got errors.

It seems that Subsonic has decided, on some queries that involve paging, to drop Where clauses so that the following And clause causes an error.

Has anyone else experienced any issues with Subsonic and SQL Server 2014 Web Edition.

We are using Subsonic 2.2 and are hesitant to upgrade to 3 unless we know it'll work as this is a major piece of work.

Note The code works fine with SQL Server 2012 Business edition.

1

There are 1 best solutions below

0
Norman C On

As noted in the comments you need to update the source code for Subsonic.

This is within ..\SubSonic-2.0-master\SubSonic\DataProviders\DataService.cs when you get the code from GitHub.

The area to update is below. Depending how you want to update it but for me using SQL Server 2012 I have just defaulted to Sql2008Generator :-

case DataProviderTypeName.SQL_SERVER:
if(Utility.IsSql2005(provider))
   generator = new Sql2005Generator(sqlQuery);
else if(Utility.IsSql2008(provider))
   generator = new Sql2008Generator(sqlQuery);
else
   generator = new Sql2000Generator(sqlQuery);
   break;