0

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.

griegs
  • 22,624
  • 33
  • 128
  • 205
  • What do you get for the database version of the DataProvider? i.e. SubSonic.DataService.Provider.DatabaseVersion . Wondering if it is failing back to the SQL2000 provider there. – Mike Walsh Sep 02 '15 at 07:38
  • I'm been using SubSonic 2.2 with SQL Server 2012 Enterprise/Express for years without any issues. Version 2.2 is pretty old, so you'll need to add some missing SQL types but overall it's a pretty easy/quick process. – Zachary Oct 09 '15 at 03:55
  • You must get the source code and add some extra simple checks to include the sql 2014 in the list of ms sql server, or else the source code drop it to default ansi sql. And do not move to version 3. Is slow as hell, is not subsonic at all, and you will end up to move back again. Subsonic 2.2 is very good, just need improvements, that they have never done. – Aristos Jan 26 '16 at 14:06
  • On my first questions here : http://stackoverflow.com/questions/2363735/benchmark-linq2sql-subsonic2-subsonic3-any-other-ideas-to-make-them-faster – Aristos Jan 26 '16 at 14:12

1 Answers1

0

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;