subsonic / SubSonic-2.0

SubSonic 2.0 Home
http://subsonic.github.io/
Other
80 stars 45 forks source link

Utility.IsSql2005 evaluation is causing error: -'ROW_NUMBER' is not a recognized function name- If using sql 2000 #25

Closed wmejiab closed 4 years ago

wmejiab commented 13 years ago

When using sql 2000 and paged query subsonic 2.2 returns 'ROW_NUMBER' is not a recognized function name.

The DatabaseVersion in provider from sqlquery is showing: "Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) \n\tMay 3 2005 23:18:38 \n\tCopyright (c) 1988-2003 Microsoft Corporation\n\tStandard Edition on Windows NT 5.2 (Build 3790: Service Pack 2)\n"

and the utility.IsSql2005 method is evaluating for "2005" public static bool IsSql2005(DataProvider provider) { return provider.DatabaseVersion.IndexOf("2005") > -1; } //Code from DataService.cs if(Utility.IsSql2005(provider)) generator = new Sql2005Generator(sqlQuery); else if(Utility.IsSql2008(provider)) generator = new Sql2008Generator(sqlQuery); else generator = new Sql2000Generator(sqlQuery); break;

And the Sql2005Generator is selected Not the Sql2000Generator.

6pac commented 4 years ago

Finally gave up after 9 years?