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

wmejiab opened this Issue Apr 30, 2011 · 0 comments

1 participant


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
generator = new Sql2005Generator(sqlQuery);
else if(Utility.IsSql2008(provider))
generator = new Sql2008Generator(sqlQuery);
generator = new Sql2000Generator(sqlQuery);

And the Sql2005Generator is selected Not the Sql2000Generator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment